示例#1
0
        public ServReportInfoModel GetEntity(int id)
        {
            ServReportInfoModel model = new ServReportInfoModel();

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

            return(model);
        }
示例#2
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        /// <param name="model"></param>
        public int UpdateReportInfoById(ServReportInfoModel model)
        {
            int result = mapContext.Update("UpdateReportInfo", model);

            return(result);
        }
示例#3
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        /// <param name="entity"></param>
        public int AddEntity(ServReportInfoModel entity)
        {
            int id = (int)mapContext.Insert("InsertReportInfo", entity);

            return(id);
        }
示例#4
0
 public bool UpdateEntity(int id, ServReportInfoModel newentity)
 {
     throw new NotImplementedException();
 }