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