Исправление работы БД после одновления струтуры
This commit is contained in:
+2054
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -112,11 +112,12 @@ public partial class Pf2eDbContext : DbContext
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
DotEnv.Load();
|
||||
DotEnv.Load(options: new DotEnvOptions(probeForEnv: true, probeLevelsToSearch: 2));
|
||||
string databaseCnnection = EnvReader.GetStringValue("DATABASE_CONNECTION");
|
||||
|
||||
// optionsBuilder.LogTo(Console.WriteLine);
|
||||
optionsBuilder.UseSnakeCaseNamingConvention();
|
||||
optionsBuilder.UseNpgsql(EnvReader.GetStringValue("DATABASE_CONNECTION"),
|
||||
optionsBuilder.UseNpgsql(databaseCnnection,
|
||||
builder =>
|
||||
{
|
||||
builder
|
||||
@@ -4,6 +4,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateRuntimeConfigurationFiles>True</GenerateRuntimeConfigurationFiles>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -17,6 +18,10 @@
|
||||
<PackageReference Include="EFCore.NamingConventions" Version="9.0.0" />
|
||||
<PackageReference Include="linq2db" Version="5.4.1" />
|
||||
<PackageReference Include="linq2db.EntityFrameworkCore" Version="9.0.0" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.4">
|
||||
<!--<PrivateAssets>all</PrivateAssets>-->
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Npgsql" Version="9.0.3" />
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.4" />
|
||||
</ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user