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

@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DaSaSo.Domain.Model
{
public class Buildingsite : DomainObject
{
public string BuildingSiteNumber { get; set; }
public string Country { get; set; }
public string ContactPerson { get; set; }
public IEnumerable<SewerObjects> SewerObjects { get; set; }
}
}

View File

@@ -10,5 +10,9 @@ namespace DaSaSo.Domain.Model
{
public string Firstname { get; set; }
public string LastName { get; set; }
public string Country { get; set; }
public string Postcode { get; set; }
public IEnumerable<Project> Projects { get; set; }
}
}

View File

@@ -10,5 +10,6 @@ namespace DaSaSo.Domain.Model
{
public string Name { get; set; }
public Client Client { get; set; }
public IEnumerable<Buildingsite> BuildingSites { get; set; }
}
}

View File

@@ -0,0 +1,6 @@
namespace DaSaSo.Domain.Model
{
public class SewerObjects
{
}
}

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");