コード例 #1
0
        public void DeleteHauspaketAttributRegel(HauspaketAttributRegelEntity hauspaketAttributRegelEntity)
        {
            hauspaket_attribut_regel result = (from x in db.hauspaket_attribut_regel
                                               where x.regel_id == hauspaketAttributRegelEntity.RegelId
                                               select x).SingleOrDefault();

            db.hauspaket_attribut_regel.Remove(result);
            db.SaveChanges();
        }
コード例 #2
0
        public void UpdateHauspaketAttributRegel(HauspaketAttributRegelEntity hauspaketAttributRegelEntity)
        {
            hauspaket_attribut_regel result = (from x in db.hauspaket_attribut_regel
                                               where x.regel_id == hauspaketAttributRegelEntity.RegelId
                                               select x).SingleOrDefault();

            result.regel_id = hauspaketAttributRegelEntity.RegelId;
            result.regel_attribut_left_id  = hauspaketAttributRegelEntity.RegelAttributLeftId;
            result.regel_attribut_right_id = hauspaketAttributRegelEntity.RegelAttributRightId;
            result.regel_preis_modifikator = hauspaketAttributRegelEntity.RegelPreisModifikator;
            result.regel_erlaubt           = hauspaketAttributRegelEntity.RegelErlaubt;

            db.SaveChanges();
        }
コード例 #3
0
        public void InsertHauspaketAttributRegel(HauspaketAttributRegelEntity hauspaketAttributRegelEntity)
        {
            hauspaket_attribut_regel h = new hauspaket_attribut_regel()
            {
                regel_id = hauspaketAttributRegelEntity.RegelId,
                regel_attribut_left_id  = hauspaketAttributRegelEntity.RegelAttributLeftId,
                regel_attribut_right_id = hauspaketAttributRegelEntity.RegelAttributRightId,
                regel_preis_modifikator = hauspaketAttributRegelEntity.RegelPreisModifikator,
                regel_erlaubt           = hauspaketAttributRegelEntity.RegelErlaubt
            };

            db.hauspaket_attribut_regel.Add(h);
            db.SaveChanges();
        }