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