public void Delete(CarColor entity) { using (carcontext context = new carcontext()) { var addedColor = context.Entry(entity); addedColor.State = EntityState.Deleted; } }
public void Update(CarBrand entity) { using (carcontext context = new carcontext()) { var updatedBrand = context.Entry(entity); updatedBrand.State = EntityState.Modified; context.SaveChanges(); } }
public void Delete(CarBrand entity) { using (carcontext context = new carcontext()) { var deletedbrand = context.Entry(entity); deletedbrand.State = EntityState.Deleted; context.SaveChanges(); } }
public void Add(CarBrand entity) { using (carcontext context = new carcontext()) { var addedbrand = context.Entry(entity); addedbrand.State = EntityState.Added; context.SaveChanges(); } }
public void Add(CarColor entity) { using (carcontext context = new carcontext()) { var addedColor = context.Entry(entity); addedColor.State = EntityState.Added; context.SaveChanges(); } }