Classes expanded

This commit is contained in:
HuskyTeufel
2021-09-12 18:57:18 +02:00
parent 28c290599b
commit 798870879a
7 changed files with 44 additions and 1 deletions

View File

@@ -5,4 +5,17 @@
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.0-preview.7.21378.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.0-preview.7.21378.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.0-preview7" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\DaSaSo.Domain\DaSaSo.Domain.csproj" />
</ItemGroup>
</Project>

View File

@@ -15,5 +15,8 @@ namespace DaSaSo.EntityFramework
}
public DbSet<Client> Clients { get; set; }
public DbSet<Project> Projects { get; set; }
public DbSet<Buildingsite> Buildingsites { get; set; }
}
}

View File

@@ -10,7 +10,7 @@ namespace DaSaSo.EntityFramework
{
public class DaSaSoDbContextFactory : IDesignTimeDbContextFactory<DaSaSoDbContext>
{
public DaSaSoDbContext CreateDbContext(string[] args)
public DaSaSoDbContext CreateDbContext(string[] args = null)
{
var options = new DbContextOptionsBuilder<DaSaSoDbContext>();
options.UseNpgsql("server = localhost");