Enum verschoben zur Domain
Datenbank converter angefangen
This commit is contained in:
15
DaSaSo.DatabaseConverter/DaSaSo.DatabaseConverter.csproj
Normal file
15
DaSaSo.DatabaseConverter/DaSaSo.DatabaseConverter.csproj
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Update="TeufelDB.xaml">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
61
DaSaSo.DatabaseConverter/Program.cs
Normal file
61
DaSaSo.DatabaseConverter/Program.cs
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
// See https://aka.ms/new-console-template for more information
|
||||||
|
|
||||||
|
using System.Collections;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Xml;
|
||||||
|
|
||||||
|
Console.WriteLine("Hello, World!");
|
||||||
|
await ReadXML();
|
||||||
|
|
||||||
|
Console.ReadLine();
|
||||||
|
|
||||||
|
|
||||||
|
static async Task ReadXML()
|
||||||
|
{
|
||||||
|
|
||||||
|
XmlReaderSettings setting = new XmlReaderSettings();
|
||||||
|
setting.Async = true;
|
||||||
|
HashSet<string> hashtable = new HashSet<string>();
|
||||||
|
using (XmlReader m_reader = XmlReader.Create("./TeufelDB.xaml",setting))
|
||||||
|
{
|
||||||
|
while (await m_reader.ReadAsync())
|
||||||
|
{
|
||||||
|
if(m_reader.IsStartElement())
|
||||||
|
{
|
||||||
|
if (m_reader.Name.Equals("Auftraggeber")) Debugger.Break();
|
||||||
|
hashtable.Add(m_reader.Name);
|
||||||
|
if (m_reader.IsEmptyElement)
|
||||||
|
{
|
||||||
|
Console.WriteLine("<{0}/>", m_reader.Name);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
Console.Write("<{0}> ", m_reader.Name);
|
||||||
|
m_reader.Read();
|
||||||
|
if (m_reader.IsStartElement())
|
||||||
|
{
|
||||||
|
Console.Write("\r\n<{0}>", m_reader.Name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (m_reader.HasAttributes)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Attributes of {0}", m_reader.Name);
|
||||||
|
while (m_reader.MoveToNextAttribute())
|
||||||
|
{
|
||||||
|
Console.WriteLine(" {0} = {1}", m_reader.Name, m_reader.Value);
|
||||||
|
}
|
||||||
|
m_reader.MoveToElement();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("Ende");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Debugger.Break();
|
||||||
|
}
|
||||||
6344
DaSaSo.DatabaseConverter/TeufelDB.xaml
Normal file
6344
DaSaSo.DatabaseConverter/TeufelDB.xaml
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,10 +1,4 @@
|
|||||||
using System;
|
namespace DaSaSo.Domain.Enums
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace DaSaSo.ViewModel.Enums
|
|
||||||
{
|
{
|
||||||
public enum EMainWindowViewType
|
public enum EMainWindowViewType
|
||||||
{
|
{
|
||||||
16
DaSaSo.Domain/Enums/EPointType.cs
Normal file
16
DaSaSo.Domain/Enums/EPointType.cs
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace DaSaSo.Domain.Enums
|
||||||
|
{
|
||||||
|
public enum EPointType
|
||||||
|
{
|
||||||
|
Leitung,
|
||||||
|
Haltung,
|
||||||
|
Schacht,
|
||||||
|
Anschlusspunkt
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using DaSaSo.Domain.Enums;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace DaSaSo.Domain.Model
|
namespace DaSaSo.Domain.Model
|
||||||
{
|
{
|
||||||
@@ -7,8 +8,10 @@ namespace DaSaSo.Domain.Model
|
|||||||
public Buildingsite BuildingSite { get; set; }
|
public Buildingsite BuildingSite { get; set; }
|
||||||
public string StreetName { get; set; }
|
public string StreetName { get; set; }
|
||||||
public string ObjektName { get; set; }
|
public string ObjektName { get; set; }
|
||||||
public string PointFrom { get; set; }
|
public SewerPoint PunktOben { get; set; }
|
||||||
public string PointTo { get; set; }
|
public EPointType PunktObenType { get; set; }
|
||||||
|
public SewerPoint PunktUnten { get; set; }
|
||||||
|
public EPointType PunktUntenType { get; set; }
|
||||||
public string Material { get; set; }
|
public string Material { get; set; }
|
||||||
public int DN { get; set; }
|
public int DN { get; set; }
|
||||||
public decimal SewerLength { get; set; }
|
public decimal SewerLength { get; set; }
|
||||||
@@ -24,4 +27,5 @@ namespace DaSaSo.Domain.Model
|
|||||||
public bool IsSelected { get; set; }
|
public bool IsSelected { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
7
DaSaSo.Domain/Model/SewerPoint.cs
Normal file
7
DaSaSo.Domain/Model/SewerPoint.cs
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
namespace DaSaSo.Domain.Model
|
||||||
|
{
|
||||||
|
public class SewerPoint : DomainObject
|
||||||
|
{
|
||||||
|
public string Objektnummer { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
271
DaSaSo.EntityFramework/Migrations/20210920062903_transfertoenum.Designer.cs
generated
Normal file
271
DaSaSo.EntityFramework/Migrations/20210920062903_transfertoenum.Designer.cs
generated
Normal file
@@ -0,0 +1,271 @@
|
|||||||
|
// <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("20210920062903_transfertoenum")]
|
||||||
|
partial class transfertoenum
|
||||||
|
{
|
||||||
|
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")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("ContactPerson")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Country")
|
||||||
|
.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")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Firstname")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("LastName")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Postcode")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Street")
|
||||||
|
.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")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("ClientId");
|
||||||
|
|
||||||
|
b.ToTable("Projects");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.SewerDamage", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
|
b.Property<int>("DamageType")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<decimal>("Distance")
|
||||||
|
.HasColumnType("numeric");
|
||||||
|
|
||||||
|
b.Property<int>("PreparationType")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<int?>("SewerObjectId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("SewerObjectId");
|
||||||
|
|
||||||
|
b.ToTable("SewerDamages");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObject", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
|
b.Property<int?>("BuildingSiteId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<bool>("BuildingsiteBarier")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<int>("DN")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<string>("Material")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("ObjektName")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<bool>("PermitNeeded")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<int?>("PunktObenId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<int>("PunktObenType")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<int?>("PunktUntenId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<int>("PunktUntenType")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<bool>("SewerActivated")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<bool>("SewerCleaned")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<decimal>("SewerLength")
|
||||||
|
.HasColumnType("numeric");
|
||||||
|
|
||||||
|
b.Property<string>("StreetName")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<bool>("WaterBarrier")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("BuildingSiteId");
|
||||||
|
|
||||||
|
b.HasIndex("PunktObenId");
|
||||||
|
|
||||||
|
b.HasIndex("PunktUntenId");
|
||||||
|
|
||||||
|
b.ToTable("SewerObjects");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.SewerPoint", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
|
b.Property<string>("Objektnummer")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("SewerPoint");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("DaSaSo.Domain.Model.Project", "Project")
|
||||||
|
.WithMany("BuildingSites")
|
||||||
|
.HasForeignKey("ProjectId");
|
||||||
|
|
||||||
|
b.Navigation("Project");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("DaSaSo.Domain.Model.Client", "Client")
|
||||||
|
.WithMany("Projects")
|
||||||
|
.HasForeignKey("ClientId");
|
||||||
|
|
||||||
|
b.Navigation("Client");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.SewerDamage", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("DaSaSo.Domain.Model.SewerObject", "SewerObject")
|
||||||
|
.WithMany("SewerDamages")
|
||||||
|
.HasForeignKey("SewerObjectId");
|
||||||
|
|
||||||
|
b.Navigation("SewerObject");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObject", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("DaSaSo.Domain.Model.Buildingsite", "BuildingSite")
|
||||||
|
.WithMany("SewerObjects")
|
||||||
|
.HasForeignKey("BuildingSiteId");
|
||||||
|
|
||||||
|
b.HasOne("DaSaSo.Domain.Model.SewerPoint", "PunktOben")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("PunktObenId");
|
||||||
|
|
||||||
|
b.HasOne("DaSaSo.Domain.Model.SewerPoint", "PunktUnten")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("PunktUntenId");
|
||||||
|
|
||||||
|
b.Navigation("BuildingSite");
|
||||||
|
|
||||||
|
b.Navigation("PunktOben");
|
||||||
|
|
||||||
|
b.Navigation("PunktUnten");
|
||||||
|
});
|
||||||
|
|
||||||
|
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");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObject", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("SewerDamages");
|
||||||
|
});
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,134 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
|
|
||||||
|
namespace DaSaSo.EntityFramework.Migrations
|
||||||
|
{
|
||||||
|
public partial class transfertoenum : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "PointFrom",
|
||||||
|
table: "SewerObjects");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "PointTo",
|
||||||
|
table: "SewerObjects");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<int>(
|
||||||
|
name: "PunktObenId",
|
||||||
|
table: "SewerObjects",
|
||||||
|
type: "integer",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<int>(
|
||||||
|
name: "PunktObenType",
|
||||||
|
table: "SewerObjects",
|
||||||
|
type: "integer",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<int>(
|
||||||
|
name: "PunktUntenId",
|
||||||
|
table: "SewerObjects",
|
||||||
|
type: "integer",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<int>(
|
||||||
|
name: "PunktUntenType",
|
||||||
|
table: "SewerObjects",
|
||||||
|
type: "integer",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0);
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "SewerPoint",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<int>(type: "integer", nullable: false)
|
||||||
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
|
Objektnummer = table.Column<string>(type: "text", nullable: true)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_SewerPoint", x => x.Id);
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_SewerObjects_PunktObenId",
|
||||||
|
table: "SewerObjects",
|
||||||
|
column: "PunktObenId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_SewerObjects_PunktUntenId",
|
||||||
|
table: "SewerObjects",
|
||||||
|
column: "PunktUntenId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_SewerObjects_SewerPoint_PunktObenId",
|
||||||
|
table: "SewerObjects",
|
||||||
|
column: "PunktObenId",
|
||||||
|
principalTable: "SewerPoint",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_SewerObjects_SewerPoint_PunktUntenId",
|
||||||
|
table: "SewerObjects",
|
||||||
|
column: "PunktUntenId",
|
||||||
|
principalTable: "SewerPoint",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_SewerObjects_SewerPoint_PunktObenId",
|
||||||
|
table: "SewerObjects");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_SewerObjects_SewerPoint_PunktUntenId",
|
||||||
|
table: "SewerObjects");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "SewerPoint");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_SewerObjects_PunktObenId",
|
||||||
|
table: "SewerObjects");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_SewerObjects_PunktUntenId",
|
||||||
|
table: "SewerObjects");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "PunktObenId",
|
||||||
|
table: "SewerObjects");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "PunktObenType",
|
||||||
|
table: "SewerObjects");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "PunktUntenId",
|
||||||
|
table: "SewerObjects");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "PunktUntenType",
|
||||||
|
table: "SewerObjects");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "PointFrom",
|
||||||
|
table: "SewerObjects",
|
||||||
|
type: "text",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "PointTo",
|
||||||
|
table: "SewerObjects",
|
||||||
|
type: "text",
|
||||||
|
nullable: true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -143,11 +143,17 @@ namespace DaSaSo.EntityFramework.Migrations
|
|||||||
b.Property<bool>("PermitNeeded")
|
b.Property<bool>("PermitNeeded")
|
||||||
.HasColumnType("boolean");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<string>("PointFrom")
|
b.Property<int?>("PunktObenId")
|
||||||
.HasColumnType("text");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<string>("PointTo")
|
b.Property<int>("PunktObenType")
|
||||||
.HasColumnType("text");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<int?>("PunktUntenId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<int>("PunktUntenType")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<bool>("SewerActivated")
|
b.Property<bool>("SewerActivated")
|
||||||
.HasColumnType("boolean");
|
.HasColumnType("boolean");
|
||||||
@@ -168,9 +174,28 @@ namespace DaSaSo.EntityFramework.Migrations
|
|||||||
|
|
||||||
b.HasIndex("BuildingSiteId");
|
b.HasIndex("BuildingSiteId");
|
||||||
|
|
||||||
|
b.HasIndex("PunktObenId");
|
||||||
|
|
||||||
|
b.HasIndex("PunktUntenId");
|
||||||
|
|
||||||
b.ToTable("SewerObjects");
|
b.ToTable("SewerObjects");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.SewerPoint", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
|
b.Property<string>("Objektnummer")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("SewerPoint");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("DaSaSo.Domain.Model.Project", "Project")
|
b.HasOne("DaSaSo.Domain.Model.Project", "Project")
|
||||||
@@ -204,7 +229,19 @@ namespace DaSaSo.EntityFramework.Migrations
|
|||||||
.WithMany("SewerObjects")
|
.WithMany("SewerObjects")
|
||||||
.HasForeignKey("BuildingSiteId");
|
.HasForeignKey("BuildingSiteId");
|
||||||
|
|
||||||
|
b.HasOne("DaSaSo.Domain.Model.SewerPoint", "PunktOben")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("PunktObenId");
|
||||||
|
|
||||||
|
b.HasOne("DaSaSo.Domain.Model.SewerPoint", "PunktUnten")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("PunktUntenId");
|
||||||
|
|
||||||
b.Navigation("BuildingSite");
|
b.Navigation("BuildingSite");
|
||||||
|
|
||||||
|
b.Navigation("PunktOben");
|
||||||
|
|
||||||
|
b.Navigation("PunktUnten");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||||
|
|||||||
@@ -19,18 +19,18 @@ namespace DaSaSo.InMemoryProvider
|
|||||||
{
|
{
|
||||||
DN = 200,
|
DN = 200,
|
||||||
Material = "STZ",
|
Material = "STZ",
|
||||||
ObjektName = "SW01",
|
ObjektName = "SW01"
|
||||||
PointFrom = "SW01",
|
//PointFrom = "SW01",
|
||||||
PointTo = "SW02"
|
//PointTo = "SW02"
|
||||||
});
|
});
|
||||||
_sewerObjects.Add(
|
_sewerObjects.Add(
|
||||||
new SewerObject()
|
new SewerObject()
|
||||||
{
|
{
|
||||||
DN = 200,
|
DN = 200,
|
||||||
Material = "STZ",
|
Material = "STZ",
|
||||||
ObjektName = "SW01",
|
ObjektName = "SW01"
|
||||||
PointFrom = "SW01",
|
//PointFrom = "SW01",
|
||||||
PointTo = "SW02"
|
//PointTo = "SW02"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using DaSaSo.ViewModel.Enums;
|
using DaSaSo.Domain.Enums;
|
||||||
|
using DaSaSo.ViewModel.Enums;
|
||||||
using DaSaSo.ViewModel.Interface;
|
using DaSaSo.ViewModel.Interface;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,5 @@
|
|||||||
using DaSaSo.Domain.Model;
|
using DaSaSo.Domain.Enums;
|
||||||
using DaSaSo.EntityFramework;
|
|
||||||
using DaSaSo.EntityFramework.Services;
|
|
||||||
using DaSaSo.ViewModel.Enums;
|
|
||||||
using DaSaSo.ViewModel.Interface;
|
using DaSaSo.ViewModel.Interface;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace DaSaSo.ViewModel.Factories
|
namespace DaSaSo.ViewModel.Factories
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
using DaSaSo.ViewModel.Enums;
|
using DaSaSo.Domain.Enums;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace DaSaSo.ViewModel.Interface
|
namespace DaSaSo.ViewModel.Interface
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using DaSaSo.Domain.Model;
|
using DaSaSo.Domain.Enums;
|
||||||
|
using DaSaSo.Domain.Model;
|
||||||
using DaSaSo.EntityFramework;
|
using DaSaSo.EntityFramework;
|
||||||
using DaSaSo.EntityFramework.Services;
|
using DaSaSo.EntityFramework.Services;
|
||||||
using DaSaSo.ViewModel.Commands;
|
using DaSaSo.ViewModel.Commands;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:DaSaSo.Wpf.Controls"
|
xmlns:local="clr-namespace:DaSaSo.Wpf.Controls"
|
||||||
xmlns:nav="clr-namespace:DaSaSo.ViewModel.Enums;assembly=DaSaSo.ViewModel"
|
xmlns:nav="clr-namespace:DaSaSo.Domain.Enums;assembly=DaSaSo.Domain"
|
||||||
xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel"
|
xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel"
|
||||||
|
|
||||||
xmlns:converters="clr-namespace:DaSaSo.Wpf.Converters"
|
xmlns:converters="clr-namespace:DaSaSo.Wpf.Converters"
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ namespace DaSaSo.Wpf.Sampledata
|
|||||||
DN = 200,
|
DN = 200,
|
||||||
Material = "STZ",
|
Material = "STZ",
|
||||||
ObjektName = "SW01",
|
ObjektName = "SW01",
|
||||||
PointFrom = "SW01",
|
//PointFrom = "SW01",
|
||||||
PointTo = "SW02",
|
//PointTo = "SW02",
|
||||||
StreetName = "Barenberg"
|
StreetName = "Barenberg"
|
||||||
});
|
});
|
||||||
_objecte.Add(
|
_objecte.Add(
|
||||||
@@ -34,8 +34,8 @@ namespace DaSaSo.Wpf.Sampledata
|
|||||||
DN = 200,
|
DN = 200,
|
||||||
Material = "STZ",
|
Material = "STZ",
|
||||||
ObjektName = "SW01",
|
ObjektName = "SW01",
|
||||||
PointFrom = "SW01",
|
//PointFrom = "SW01",
|
||||||
PointTo = "SW02",
|
//PointTo = "SW02",
|
||||||
StreetName = "Barenberg"
|
StreetName = "Barenberg"
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
14
DaSaSo.sln
14
DaSaSo.sln
@@ -7,13 +7,15 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DaSaSo.Domain", "DaSaSo.Dom
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DaSaSo.EntityFramework", "DaSaSo.EntityFramework\DaSaSo.EntityFramework.csproj", "{E75F15AE-D49B-4768-A5EA-DC05AB60A898}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DaSaSo.EntityFramework", "DaSaSo.EntityFramework\DaSaSo.EntityFramework.csproj", "{E75F15AE-D49B-4768-A5EA-DC05AB60A898}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DaSaSo.ConsoleApp", "DaSaSo.ConsoleApp\DaSaSo.ConsoleApp.csproj", "{F4DE6BE1-860A-4088-96E2-D3852A52FE70}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DaSaSo.ConsoleApp", "DaSaSo.ConsoleApp\DaSaSo.ConsoleApp.csproj", "{F4DE6BE1-860A-4088-96E2-D3852A52FE70}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DaSaSo.Wpf", "DaSaSo.Wpf\DaSaSo.Wpf.csproj", "{0B11DE2B-BBAB-465E-B9D4-9E02B804A9CC}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DaSaSo.Wpf", "DaSaSo.Wpf\DaSaSo.Wpf.csproj", "{0B11DE2B-BBAB-465E-B9D4-9E02B804A9CC}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DaSaSo.ViewModel", "DaSaSo.ViewModel\DaSaSo.ViewModel.csproj", "{7CC8889C-87AD-4E32-B9AB-C4B322828797}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DaSaSo.ViewModel", "DaSaSo.ViewModel\DaSaSo.ViewModel.csproj", "{7CC8889C-87AD-4E32-B9AB-C4B322828797}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DaSaSo.InMemoryProvider", "DaSaSo.InMemoryProvider\DaSaSo.InMemoryProvider.csproj", "{838B8397-FF4A-4E61-A6A8-B3F8D00D120D}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DaSaSo.InMemoryProvider", "DaSaSo.InMemoryProvider\DaSaSo.InMemoryProvider.csproj", "{838B8397-FF4A-4E61-A6A8-B3F8D00D120D}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DaSaSo.DatabaseConverter", "DaSaSo.DatabaseConverter\DaSaSo.DatabaseConverter.csproj", "{E0842F1A-E74D-4B84-BD27-3585901B0DE9}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
@@ -45,6 +47,10 @@ Global
|
|||||||
{838B8397-FF4A-4E61-A6A8-B3F8D00D120D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{838B8397-FF4A-4E61-A6A8-B3F8D00D120D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{838B8397-FF4A-4E61-A6A8-B3F8D00D120D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{838B8397-FF4A-4E61-A6A8-B3F8D00D120D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{838B8397-FF4A-4E61-A6A8-B3F8D00D120D}.Release|Any CPU.Build.0 = Release|Any CPU
|
{838B8397-FF4A-4E61-A6A8-B3F8D00D120D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{E0842F1A-E74D-4B84-BD27-3585901B0DE9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{E0842F1A-E74D-4B84-BD27-3585901B0DE9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{E0842F1A-E74D-4B84-BD27-3585901B0DE9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{E0842F1A-E74D-4B84-BD27-3585901B0DE9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|||||||
Reference in New Issue
Block a user