Пример #1
0
        public async Task <ActionResult> RemoveUser(string role, string username)
        {
            var model = new RemoveUserFromRoleViewModel(role, username);
            await _roleManagerAppService.RemoveUserFromRole(model);

            return(ResponseDelete());
        }
Пример #2
0
        public async Task <ActionResult <DefaultResponse <bool> > > RemoveUser([FromBody] RemoveUserFromRoleViewModel model)
        {
            if (!ModelState.IsValid)
            {
                NotifyModelStateErrors();
                return(Response(false));
            }
            await _roleManagerAppService.RemoveUserFromRole(model);

            return(Response(true));
        }