public void DeleteHauspaketAttributWert(HauspaketAttributWertEntity hauspaketAttributWertEntity) { hauspaket_attribut_wert result = (from x in db.hauspaket_attribut_wert where x.wert_id == hauspaketAttributWertEntity.WertId select x).SingleOrDefault(); db.hauspaket_attribut_wert.Remove(result); db.SaveChanges(); }
public void UpdateHauspaketAttributWert(HauspaketAttributWertEntity hauspaketAttributWertEntity) { hauspaket_attribut_wert result = (from x in db.hauspaket_attribut_wert where x.wert_id == hauspaketAttributWertEntity.WertId select x).SingleOrDefault(); result.wert_id = hauspaketAttributWertEntity.WertId; result.attribut_id = hauspaketAttributWertEntity.AttributId; result.wert_ordnung = hauspaketAttributWertEntity.WertOrdnung; result.wert_text = hauspaketAttributWertEntity.WertText; result.archived = hauspaketAttributWertEntity.Archived; db.SaveChanges(); }
public void InsertHauspaketAttributWert(HauspaketAttributWertEntity hauspaketAttributWertEntity) { hauspaket_attribut_wert h = new hauspaket_attribut_wert() { wert_id = hauspaketAttributWertEntity.WertId, attribut_id = hauspaketAttributWertEntity.AttributId, wert_ordnung = hauspaketAttributWertEntity.WertOrdnung, wert_text = hauspaketAttributWertEntity.WertText, archived = hauspaketAttributWertEntity.Archived }; db.hauspaket_attribut_wert.Add(h); db.SaveChanges(); }