public ActionResult Edit(Guid id)
        {
            CommonRoleInfo entity = CommonRoleInfoService.GetModel(id);
            var            model  = Mapper.Map <CommonRoleInfoDTO>(entity);

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

                return(context.SaveChanges() > 0);
            }
        }
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public bool Add(CommonRoleInfo entity)
        {
            using (var context = new DbContext())
            {
                context.CommonRoleInfoContext.Add(entity);

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