Kunden können hinzugefügt werden

This commit is contained in:
Husky
2020-02-16 20:23:18 +01:00
parent 3b01d98d2c
commit 10ea0783e7
2 changed files with 19 additions and 7 deletions

View File

@@ -12,18 +12,20 @@ namespace KanSan.Klassen
public string PLZ { get; set; }
public string Ort { get; set; }
public List<Baustelle> Baustellen { get; } = new List<Baustelle>();
public List<Baustelle> Baustellen { get; set; } = new List<Baustelle>();
public void NeueBaustelle(string ort, string strasse, string projektnummer)
public void NeueBaustelle(KanSanContext ksc,string ort, string strasse, string projektnummer)
{
Baustelle baustelle = new Baustelle(this)
{
Ort = ort,
ID = Guid.NewGuid(),
Projektnummer = projektnummer,
Strasse = Strasse
Strasse = strasse
};
Baustellen.Add(baustelle);
//Baustellen.Add(baustelle);
ksc.Add(baustelle);
ksc.SaveChanges();
}
}
}