Example #1
0
        public void DeleteBerater(BeraterEntity beraterEntity)
        {
            berater result = (from x in db.berater
                              where x.berater_id == beraterEntity.BeraterId
                              select x).SingleOrDefault();

            db.berater.Remove(result);
            db.SaveChanges();
        }
Example #2
0
        public void UpdateBerater(BeraterEntity beraterEntity)
        {
            berater result = (from x in db.berater
                              where x.berater_id == beraterEntity.BeraterId
                              select x).SingleOrDefault();

            result.benutzer_id   = beraterEntity.BenutzerId;
            result.berater_id    = beraterEntity.BeraterId;
            result.bild          = beraterEntity.Bild;
            result.hersteller_id = beraterEntity.HerstellerId;
            db.SaveChanges();
        }
Example #3
0
        public void InsertBerater(BeraterEntity beraterEntity)
        {
            berater b = new berater()
            {
                benutzer_id   = beraterEntity.BenutzerId,
                berater_id    = beraterEntity.BeraterId,
                bild          = beraterEntity.Bild,
                hersteller_id = beraterEntity.HerstellerId
            };

            db.berater.Add(b);
            db.SaveChanges();
        }