1
0
mirror of synced 2024-11-23 22:41:01 +01:00

Update to .net 8, bump dependencies, fix weird max issue

This commit is contained in:
asesidaa 2023-09-16 00:49:05 +08:00
parent 1cb593651f
commit 7eee09d32d
4 changed files with 25 additions and 34 deletions

View File

@ -50,7 +50,7 @@ public class InitialDataCheckController : BaseController<InitialDataCheckControl
response.AryVerupNoData1s.AddRange(aryVerUp);
var danData = new List<InitialdatacheckResponse.VerupNoData2.InformationData>();
for (var danId = Constants.MIN_DAN_ID; danId <= 18; danId++)
for (var danId = Constants.MIN_DAN_ID; danId <= Constants.MAX_DAN_ID; danId++)
{
danData.Add(new InitialdatacheckResponse.VerupNoData2.InformationData
{

View File

@ -23,22 +23,12 @@ try
{
var builder = WebApplication.CreateBuilder(args);
builder.Host.ConfigureAppConfiguration((hostingContext, config) =>
{
const string configurationsDirectory = "Configurations";
config.AddJsonFile($"{configurationsDirectory}/Kestrel.json", optional: true, reloadOnChange: false);
config.AddJsonFile($"{configurationsDirectory}/Logging.json", optional: false, reloadOnChange: false);
config.AddJsonFile($"{configurationsDirectory}/Database.json", optional: false, reloadOnChange: false);
config.AddJsonFile($"{configurationsDirectory}/ServerSettings.json", optional: false, reloadOnChange: false);
config.AddJsonFile($"{configurationsDirectory}/DataSettings.json", optional: true, reloadOnChange: false);
});
// Manually enable tls 1.0
builder.WebHost.UseKestrel(kestrelOptions =>
{
kestrelOptions.ConfigureHttpsDefaults(options =>
options.SslProtocols = SslProtocols.Tls | SslProtocols.Tls11 | SslProtocols.Tls12 | SslProtocols.Tls13);
});
const string configurationsDirectory = "Configurations";
builder.Configuration.AddJsonFile($"{configurationsDirectory}/Kestrel.json", optional: true, reloadOnChange: false);
builder.Configuration.AddJsonFile($"{configurationsDirectory}/Logging.json", optional: false, reloadOnChange: false);
builder.Configuration.AddJsonFile($"{configurationsDirectory}/Database.json", optional: false, reloadOnChange: false);
builder.Configuration.AddJsonFile($"{configurationsDirectory}/ServerSettings.json", optional: false, reloadOnChange: false);
builder.Configuration.AddJsonFile($"{configurationsDirectory}/DataSettings.json", optional: true, reloadOnChange: false);
builder.Host.UseSerilog((context, configuration) =>
{

View File

@ -21,7 +21,7 @@ public class CardService : ICardService
public ulong GetNextBaid()
{
return context.Cards.Any() ? context.Cards.Max(card => card.Baid) + 1 : 1;
return context.Cards.Any() ? context.Cards.ToList().Max(card => card.Baid) + 1 : 1;
}
public async Task<List<User>> GetUsersFromCards()

View File

@ -1,10 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>0.3.0-alpha</Version>
<Version>0.4.0-alpha</Version>
<LangVersion>12</LangVersion>
</PropertyGroup>
<ItemGroup>
@ -12,23 +13,23 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="6.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.0-rc.1.22426.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.0-rc.1.22426.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.0-rc.1.22426.7">
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.0-rc.1.23421.29" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.0-rc.1.23419.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.0-rc.1.23419.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.0-rc.1.23419.6">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="protobuf-net" Version="3.1.17" />
<PackageReference Include="protobuf-net.AspNetCore" Version="3.1.17" />
<PackageReference Include="Serilog.AspNetCore" Version="6.1.0-dev-00281" />
<PackageReference Include="Serilog.Expressions" Version="3.4.1-dev-00095" />
<PackageReference Include="SharpZipLib" Version="1.4.0" />
<PackageReference Include="Swan.Core" Version="6.0.2-beta.90" />
<PackageReference Include="Swan.Logging" Version="6.0.2-beta.69" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
<PackageReference Include="Throw" Version="1.3.0" />
<PackageReference Include="Yoh.Text.Json.NamingPolicies" Version="0.2.1" />
<PackageReference Include="protobuf-net" Version="3.2.26" />
<PackageReference Include="protobuf-net.AspNetCore" Version="3.2.12" />
<PackageReference Include="Serilog.AspNetCore" Version="7.0.0" />
<PackageReference Include="Serilog.Expressions" Version="3.4.2-dev-00120" />
<PackageReference Include="SharpZipLib" Version="1.4.2" />
<PackageReference Include="Swan.Core" Version="7.0.0-beta.2" />
<PackageReference Include="Swan.Logging" Version="6.0.2-beta.96" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="Throw" Version="1.4.0" />
<PackageReference Include="Yoh.Text.Json.NamingPolicies" Version="1.0.0" />
</ItemGroup>
<ItemGroup>