WIP dependency Injection
This commit is contained in:
191
DaSaSo.EntityFramework/Migrations/20210913113208_StreetAdded.Designer.cs
generated
Normal file
191
DaSaSo.EntityFramework/Migrations/20210913113208_StreetAdded.Designer.cs
generated
Normal file
@@ -0,0 +1,191 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using DaSaSo.EntityFramework;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
namespace DaSaSo.EntityFramework.Migrations
|
||||
{
|
||||
[DbContext(typeof(DaSaSoDbContext))]
|
||||
[Migration("20210913113208_StreetAdded")]
|
||||
partial class StreetAdded
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63)
|
||||
.HasAnnotation("ProductVersion", "6.0.0-preview.7.21378.4")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<string>("BuildingSiteNumber")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ContactPerson")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Country")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("ProjectId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProjectId");
|
||||
|
||||
b.ToTable("Buildingsites");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Client", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<string>("Country")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Firstname")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("LastName")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Postcode")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Street")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Clients");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<int>("ClientId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ClientId");
|
||||
|
||||
b.ToTable("Projects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObjects", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<int>("BuildingSiteId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("DN")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("ObjektName")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("PointFrom")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("PointTo")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<decimal>("SewerLength")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<string>("StreetName")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("BuildingSiteId");
|
||||
|
||||
b.ToTable("SewerObjects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Project", null)
|
||||
.WithMany("BuildingSites")
|
||||
.HasForeignKey("ProjectId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Client", "Client")
|
||||
.WithMany("Projects")
|
||||
.HasForeignKey("ClientId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Client");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObjects", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Buildingsite", "BuildingSite")
|
||||
.WithMany("SewerObjects")
|
||||
.HasForeignKey("BuildingSiteId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("BuildingSite");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||
{
|
||||
b.Navigation("SewerObjects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Client", b =>
|
||||
{
|
||||
b.Navigation("Projects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||
{
|
||||
b.Navigation("BuildingSites");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace DaSaSo.EntityFramework.Migrations
|
||||
{
|
||||
public partial class StreetAdded : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Street",
|
||||
table: "Clients",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Street",
|
||||
table: "Clients");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -71,6 +71,10 @@ namespace DaSaSo.EntityFramework.Migrations
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Street")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Clients");
|
||||
|
||||
Reference in New Issue
Block a user