/**********************修该**********************/ public bool Edit <T>(T Model, Expression <Func <T, bool> > Where, bool IsCheck = false) where T : BaseEntity, new() { try { if (IsCheck) { this.Check(Model); } if (edit.Edit(Model, Where)) { return(true); } throw new Exception("操作失败"); } catch (Exception ex) { SetError(ex.Message); return(false); } }
public bool Edit(BaseModel entity, bool IsCheck = true) { try { if (IsCheck) { this.Check(entity); } if (edit.Edit(entity)) { return(true); } throw new Exception("操作失败"); } catch (Exception ex) { SetError(ex.Message); return(false); } }