Пример #1
0
        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();
        }
Пример #2
0
        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();
        }
Пример #3
0
        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();
        }