public void Delete(T entity) { using (VETEntities entities = new VETEntities()) { entities.Entry(entity).State = EntityState.Deleted; entities.SaveChanges(); } }
public void Update(T entity) { using (VETEntities entities = new VETEntities()) { entities.Entry(entity).State = EntityState.Modified; entities.SaveChanges(); } }