/**********************删除**********************/ public bool Delete <T>(Expression <Func <T, bool> > Where) where T : BaseEntity, new() { try { if (delete.Delete <T>(Where)) { return(true); } throw new Exception("操作失败"); } catch (Exception ex) { SetError(ex.Message); return(false); } }
public bool Delete(BaseModel entity) { try { if (delete.Delete(entity)) { return(true); } throw new Exception("操作失败"); } catch (Exception ex) { SetError(ex.Message); return(false); } }