예제 #1
0
        //Vorsicht, hier sind 2 PK
        public void DeleteHauspaketAttributZuord(HauspaketAttributZuordEntity hauspaketAttributZuordEntity)
        {
            hauspaket_attribut_zuord result = (from x in db.hauspaket_attribut_zuord
                                               where x.wert_id == hauspaketAttributZuordEntity.WertId && x.hauspaket_id == hauspaketAttributZuordEntity.HauspaketId
                                               select x).SingleOrDefault();

            db.hauspaket_attribut_zuord.Remove(result);
            db.SaveChanges();
        }
예제 #2
0
        public void InsertHauspaketAttributZuord(HauspaketAttributZuordEntity hauspaketAttributZuordEntity)
        {
            hauspaket_attribut_zuord h = new hauspaket_attribut_zuord()
            {
                hauspaket_id = hauspaketAttributZuordEntity.HauspaketId,
                wert_id      = hauspaketAttributZuordEntity.WertId
            };

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