public ServReportInfoModel GetEntity(int id) { ServReportInfoModel model = new ServReportInfoModel(); try { model = mapContext.QueryForList <ServReportInfoModel>("GetReportInfoById", id).FirstOrDefault(); } catch (Exception ex) { throw ex; } return(model); }
/// <summary> /// 更新一条数据 /// </summary> /// <param name="model"></param> public int UpdateReportInfoById(ServReportInfoModel model) { int result = mapContext.Update("UpdateReportInfo", model); return(result); }
/// <summary> /// 增加一条数据 /// </summary> /// <param name="entity"></param> public int AddEntity(ServReportInfoModel entity) { int id = (int)mapContext.Insert("InsertReportInfo", entity); return(id); }
public bool UpdateEntity(int id, ServReportInfoModel newentity) { throw new NotImplementedException(); }