Skip to content

Commit

Permalink
#23 added api to update reservation from lower status to contract
Browse files Browse the repository at this point in the history
  • Loading branch information
sipakov committed Jun 14, 2023
1 parent 817af24 commit 93c1879
Show file tree
Hide file tree
Showing 18 changed files with 2,385 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,22 @@
<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2021.2.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="6.0.3" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.3" />
</ItemGroup>

<ItemGroup>
<Content Include="appsettings.json">
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>

</Project>
8 changes: 5 additions & 3 deletions AlgoTecture.Data.Persistence.Ef/ApplicationDbContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ public class ApplicationDbContext : DbContext

public virtual DbSet<PriceSpecification> PriceSpecifications { get; set; }

private Provider _provider;
public ApplicationDbContext() {}

private Provider _provider = Provider.NpgSql;

public ApplicationDbContext() { }

public ApplicationDbContext(Provider provider = Provider.NpgSql)
{
_provider = provider;
Expand All @@ -45,6 +46,7 @@ protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
}

var appConnectionString = Configurator.GetConfiguration().GetConnectionString("Algotecture-Demo");

if (string.IsNullOrEmpty(appConnectionString)) return;

if (optionsBuilder.IsConfigured)
Expand Down
Loading

0 comments on commit 93c1879

Please sign in to comment.