public static void DbCreate(BusParOfBusFunc entity) { var dbe = new Model1(); dbe.BusParOfBusFuncs.Add(entity); dbe.SaveChanges(); }
public static void BusParOfBusFuncUpdate(BusParOfBusFunc entity) { using (var dbe = new Model1()) { dbe.BusParOfBusFuncs.Attach(entity); dbe.Entry(entity).State = EntityState.Modified; dbe.SaveChanges(); } }
public static void BusParOfBusFuncDelete(BusParOfBusFunc entity) { using (var dbe = new Model1()) { dbe.BusParOfBusFuncs.Attach(entity); dbe.BusParOfBusFuncs.Remove(entity); dbe.SaveChanges(); } }