Пример #1
0
        public ServReportSuspectModel GetEntity(int id)
        {
            ServReportSuspectModel model = new ServReportSuspectModel();

            try
            {
                model = mapContext.QueryForList <ServReportSuspectModel>("GetReportSuspectById", id).FirstOrDefault();
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(model);
        }
Пример #2
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        /// <param name="model"></param>
        public int UpdateReportSuspectById(ServReportSuspectModel model)
        {
            int result = mapContext.Update("UpdateReportSuspect", model);

            return(result);
        }
Пример #3
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        /// <param name="entity"></param>
        public int AddEntity(ServReportSuspectModel entity)
        {
            int id = (int)mapContext.Insert("InsertReportSuspect", entity);

            return(id);
        }
Пример #4
0
 public bool UpdateEntity(int id, ServReportSuspectModel newentity)
 {
     throw new NotImplementedException();
 }