public bool Delete(int id) { var entity = GetDetail(id); if (entity != null) { context.Set <T>().Remove(entity); int i = context.SaveChanges();//how many rows will be effected return(i > 0); } return(true); }
public bool Delete(int id) { var entity = GetDetail(id); if (entity != null) { context.Set <T>().Remove(entity); int i = context.SaveChanges();//how many rows will be effected return(i > 0); } return(true); }