Exemplo n.º 1
0
        public void Update(UpdateRoleInput input)
        {
            input.Validate();

            SysRole role = this.DbContext.QueryByKey <SysRole>(input.Id, true);

            role.NotNull("角色不存在");

            AceMapper.Map(input, role);

            this.DbContext.DoWithTransaction(() =>
            {
                this.DbContext.Update(role);
            });
        }