mirror of
https://github.com/sphildreth/roadie
synced 2024-11-22 20:23:16 +00:00
v20190316.1 Updated all NuGet packages updated to EF 2.2.3
This commit is contained in:
parent
a76b5c586f
commit
ca98411c68
8 changed files with 68 additions and 50 deletions
|
@ -16,7 +16,7 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="2.3.2" />
|
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="2.3.3" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.2.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.2.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.2.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.2.0" />
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
|
||||||
<PackageReference Include="xunit" Version="2.4.1" />
|
<PackageReference Include="xunit" Version="2.4.1" />
|
||||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
|
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
|
|
@ -26,7 +26,8 @@ namespace Roadie.Library.Data
|
||||||
[Required]
|
[Required]
|
||||||
public Guid RoadieId { get; set; }
|
public Guid RoadieId { get; set; }
|
||||||
|
|
||||||
[Column("status", TypeName = "enum")]
|
|
||||||
|
[Column("status")]
|
||||||
public Statuses? Status { get; set; }
|
public Statuses? Status { get; set; }
|
||||||
|
|
||||||
public EntityBase()
|
public EntityBase()
|
||||||
|
|
|
@ -44,6 +44,15 @@ namespace Roadie.Library.Data
|
||||||
{
|
{
|
||||||
base.OnModelCreating(builder);
|
base.OnModelCreating(builder);
|
||||||
|
|
||||||
|
//builder
|
||||||
|
// .Entity<ScanHistory>()
|
||||||
|
// .Property(e => e.Status)
|
||||||
|
// .HasConversion(
|
||||||
|
// v => v.ToString(),
|
||||||
|
// v => string.IsNullOrEmpty(v) ? Statuses.Ok : (Statuses)Enum.Parse(typeof(Statuses), v))
|
||||||
|
// .HasDefaultValue(Statuses.Ok);
|
||||||
|
|
||||||
|
|
||||||
//builder
|
//builder
|
||||||
// .Entity<Artist>()
|
// .Entity<Artist>()
|
||||||
// .Property(e => e.Status)
|
// .Property(e => e.Status)
|
||||||
|
|
|
@ -9,22 +9,22 @@
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="CsvHelper" Version="12.1.2" />
|
<PackageReference Include="CsvHelper" Version="12.1.2" />
|
||||||
<PackageReference Include="EFCore.BulkExtensions" Version="2.4.0" />
|
<PackageReference Include="EFCore.BulkExtensions" Version="2.4.3" />
|
||||||
<PackageReference Include="FluentFTP" Version="21.0.0" />
|
<PackageReference Include="FluentFTP" Version="23.1.0" />
|
||||||
<PackageReference Include="Hashids.net" Version="1.2.2" />
|
<PackageReference Include="Hashids.net" Version="1.2.2" />
|
||||||
<PackageReference Include="HtmlAgilityPack" Version="1.8.14" />
|
<PackageReference Include="HtmlAgilityPack" Version="1.9.2" />
|
||||||
<PackageReference Include="IdSharp.Common" Version="1.0.1" />
|
<PackageReference Include="IdSharp.Common" Version="1.0.1" />
|
||||||
<PackageReference Include="IdSharp.Tagging" Version="1.0.0-rc3" />
|
<PackageReference Include="IdSharp.Tagging" Version="1.0.0-rc3" />
|
||||||
<PackageReference Include="Inflatable.Lastfm" Version="1.1.0.339" />
|
<PackageReference Include="Inflatable.Lastfm" Version="1.1.0.339" />
|
||||||
<PackageReference Include="Mapster" Version="3.3.1" />
|
<PackageReference Include="Mapster" Version="3.3.2" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="2.2.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="2.2.0" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.1" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.3" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Caching.Redis" Version="2.2.0" />
|
<PackageReference Include="Microsoft.Extensions.Caching.Redis" Version="2.2.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.2.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.2.0" />
|
||||||
<PackageReference Include="MimeMapping" Version="1.0.1.12" />
|
<PackageReference Include="MimeMapping" Version="1.0.1.12" />
|
||||||
<PackageReference Include="NodaTime" Version="2.4.4" />
|
<PackageReference Include="NodaTime" Version="2.4.4" />
|
||||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="2.1.4" />
|
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="2.2.0" />
|
||||||
<PackageReference Include="RestSharp" Version="106.6.7" />
|
<PackageReference Include="RestSharp" Version="106.6.9" />
|
||||||
<PackageReference Include="SixLabors.Core" Version="1.0.0-beta0006" />
|
<PackageReference Include="SixLabors.Core" Version="1.0.0-beta0006" />
|
||||||
<PackageReference Include="SixLabors.ImageSharp" Version="1.0.0-beta0005" />
|
<PackageReference Include="SixLabors.ImageSharp" Version="1.0.0-beta0005" />
|
||||||
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="1.0.0-beta0005" />
|
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="1.0.0-beta0005" />
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
<PackageReference Include="System.Drawing.Common" Version="4.5.1" />
|
<PackageReference Include="System.Drawing.Common" Version="4.5.1" />
|
||||||
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="4.5.0" />
|
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="4.5.0" />
|
||||||
<PackageReference Include="System.Runtime.Caching" Version="4.5.0" />
|
<PackageReference Include="System.Runtime.Caching" Version="4.5.0" />
|
||||||
<PackageReference Include="z440.atl.core" Version="2.5.0" />
|
<PackageReference Include="z440.atl.core" Version="2.6.0" />
|
||||||
<PackageReference Include="zlib.net-mutliplatform" Version="1.0.4" />
|
<PackageReference Include="zlib.net-mutliplatform" Version="1.0.4" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="2.2.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="2.2.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
|
||||||
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="5.4.0" />
|
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="5.4.0" />
|
||||||
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.0.10" />
|
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.0.11" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -32,10 +32,12 @@ namespace Roadie.Api.Services
|
||||||
LibraryStats result = null;
|
LibraryStats result = null;
|
||||||
var sw = new Stopwatch();
|
var sw = new Stopwatch();
|
||||||
sw.Start();
|
sw.Start();
|
||||||
using (var conn = new MySqlConnection(this.Configuration.ConnectionString))
|
try
|
||||||
{
|
{
|
||||||
conn.Open();
|
using (var conn = new MySqlConnection(this.Configuration.ConnectionString))
|
||||||
var sql = @"SELECT rm.releaseMediaCount AS releaseMediaCount, COUNT(r.roadieId) AS releaseCount,
|
{
|
||||||
|
conn.Open();
|
||||||
|
var sql = @"SELECT rm.releaseMediaCount AS releaseMediaCount, COUNT(r.roadieId) AS releaseCount,
|
||||||
ts.trackCount, ts.trackDuration as TotalTrackDuration, ts.trackSize as TotalTrackSize, ac.artistCount, lc.labelCount, pc.playedCount, uc.userCount, cc.collectionCount, pl.playlistCount
|
ts.trackCount, ts.trackDuration as TotalTrackDuration, ts.trackSize as TotalTrackSize, ac.artistCount, lc.labelCount, pc.playedCount, uc.userCount, cc.collectionCount, pl.playlistCount
|
||||||
FROM `release` r
|
FROM `release` r
|
||||||
INNER JOIN (
|
INNER JOIN (
|
||||||
|
@ -66,53 +68,59 @@ namespace Roadie.Api.Services
|
||||||
INNER JOIN (
|
INNER JOIN (
|
||||||
SELECT COUNT(1) as playlistCount
|
SELECT COUNT(1) as playlistCount
|
||||||
FROM `playlist`) pl;";
|
FROM `playlist`) pl;";
|
||||||
using (var cmd = new MySqlCommand(sql, conn))
|
using (var cmd = new MySqlCommand(sql, conn))
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
using (var rdr = await cmd.ExecuteReaderAsync())
|
try
|
||||||
{
|
{
|
||||||
if (rdr.HasRows)
|
using (var rdr = await cmd.ExecuteReaderAsync())
|
||||||
{
|
{
|
||||||
while (rdr.Read())
|
if (rdr.HasRows)
|
||||||
{
|
{
|
||||||
result = new LibraryStats
|
while (rdr.Read())
|
||||||
{
|
{
|
||||||
UserCount = SafeParser.ToNumber<int?>(rdr["UserCount"]),
|
result = new LibraryStats
|
||||||
CollectionCount = SafeParser.ToNumber<int?>(rdr["CollectionCount"]),
|
{
|
||||||
PlaylistCount = SafeParser.ToNumber<int?>(rdr["PlaylistCount"]),
|
UserCount = SafeParser.ToNumber<int?>(rdr["UserCount"]),
|
||||||
ArtistCount = SafeParser.ToNumber<int?>(rdr["ArtistCount"]),
|
CollectionCount = SafeParser.ToNumber<int?>(rdr["CollectionCount"]),
|
||||||
LabelCount = SafeParser.ToNumber<int?>(rdr["LabelCount"]),
|
PlaylistCount = SafeParser.ToNumber<int?>(rdr["PlaylistCount"]),
|
||||||
ReleaseCount = SafeParser.ToNumber<int?>(rdr["ReleaseCount"]),
|
ArtistCount = SafeParser.ToNumber<int?>(rdr["ArtistCount"]),
|
||||||
ReleaseMediaCount = SafeParser.ToNumber<int?>(rdr["ReleaseMediaCount"]),
|
LabelCount = SafeParser.ToNumber<int?>(rdr["LabelCount"]),
|
||||||
PlayedCount = SafeParser.ToNumber<int?>(rdr["PlayedCount"]),
|
ReleaseCount = SafeParser.ToNumber<int?>(rdr["ReleaseCount"]),
|
||||||
TrackCount = SafeParser.ToNumber<int?>(rdr["TrackCount"]),
|
ReleaseMediaCount = SafeParser.ToNumber<int?>(rdr["ReleaseMediaCount"]),
|
||||||
TotalTrackDuration = SafeParser.ToNumber<long?>(rdr["TotalTrackDuration"]),
|
PlayedCount = SafeParser.ToNumber<int?>(rdr["PlayedCount"]),
|
||||||
TotalTrackSize = SafeParser.ToNumber<long?>(rdr["TotalTrackSize"])
|
TrackCount = SafeParser.ToNumber<int?>(rdr["TrackCount"]),
|
||||||
};
|
TotalTrackDuration = SafeParser.ToNumber<long?>(rdr["TotalTrackDuration"]),
|
||||||
|
TotalTrackSize = SafeParser.ToNumber<long?>(rdr["TotalTrackSize"])
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
catch (Exception ex)
|
||||||
catch (Exception ex)
|
{
|
||||||
{
|
this.Logger.LogError(ex);
|
||||||
this.Logger.LogError(ex);
|
}
|
||||||
}
|
finally
|
||||||
finally
|
{
|
||||||
{
|
conn.Close();
|
||||||
conn.Close();
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
var lastScan = this.DbContext.ScanHistories.OrderByDescending(x => x.CreatedDate).FirstOrDefault();
|
||||||
|
if (lastScan != null)
|
||||||
|
{
|
||||||
|
result.LastScan = lastScan.CreatedDate;
|
||||||
|
}
|
||||||
|
sw.Stop();
|
||||||
|
|
||||||
}
|
}
|
||||||
var lastScan = this.DbContext.ScanHistories.OrderByDescending(x => x.CreatedDate).FirstOrDefault();
|
catch (Exception ex)
|
||||||
if (lastScan != null)
|
|
||||||
{
|
{
|
||||||
result.LastScan = lastScan.CreatedDate;
|
this.Logger.LogError(ex);
|
||||||
}
|
}
|
||||||
sw.Stop();
|
|
||||||
return new OperationResult<LibraryStats>
|
return new OperationResult<LibraryStats>
|
||||||
{
|
{
|
||||||
IsSuccess = true,
|
IsSuccess = result != null,
|
||||||
OperationTime = sw.ElapsedMilliseconds,
|
OperationTime = sw.ElapsedMilliseconds,
|
||||||
Data = result
|
Data = result
|
||||||
};
|
};
|
||||||
|
|
|
@ -23,18 +23,18 @@
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="BCrypt-Core" Version="2.0.0" />
|
<PackageReference Include="BCrypt-Core" Version="2.0.0" />
|
||||||
<PackageReference Include="Mapster" Version="3.3.1" />
|
<PackageReference Include="Mapster" Version="3.3.2" />
|
||||||
<PackageReference Include="Microsoft.AspNet.SignalR" Version="2.4.0" />
|
<PackageReference Include="Microsoft.AspNet.SignalR" Version="2.4.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.All" />
|
<PackageReference Include="Microsoft.AspNetCore.All" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.OData" Version="7.1.0" />
|
<PackageReference Include="Microsoft.AspNetCore.OData" Version="7.1.0" />
|
||||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.1" />
|
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.3" />
|
||||||
<PackageReference Include="Serilog.AspNetCore" Version="2.1.1" />
|
<PackageReference Include="Serilog.AspNetCore" Version="2.1.1" />
|
||||||
<PackageReference Include="Serilog.Exceptions" Version="5.0.0" />
|
<PackageReference Include="Serilog.Exceptions" Version="5.0.0" />
|
||||||
<PackageReference Include="Serilog.Settings.Configuration" Version="3.0.1" />
|
<PackageReference Include="Serilog.Settings.Configuration" Version="3.0.1" />
|
||||||
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
|
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
|
||||||
<PackageReference Include="Serilog.Sinks.RollingFileAlternate" Version="2.0.9" />
|
<PackageReference Include="Serilog.Sinks.RollingFileAlternate" Version="2.0.9" />
|
||||||
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="5.4.0" />
|
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="5.4.0" />
|
||||||
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.0.10" />
|
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.0.11" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
Loading…
Reference in a new issue