Kunden können hinzugefügt werden
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user