Exemple #1
0
        public ActionResult Edit(Guid id)
        {
            CommonActionInfo entity = CommonActionInfoService.GetModel(id);
            var model = Mapper.Map <CommonActionInfoDTO>(entity);

            return(View(model));
        }
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public bool Modify(CommonActionInfo entity)
        {
            using (var context = new DbContext())
            {
                context.CommonActionInfoContext.Update(entity);

                return(context.SaveChanges() > 0);
            }
        }