Пример #1
0
        public async Task <IActionResult> DeleteUser(Guid id)
        {
            var user = await _userManager.FindByIdAsync(id.ToString());

            if (user != null)
            {
                user.Status = false;
                await _userManager.UpdateAsync(user);

                _service.CloseAccounts(Guid.Parse(user.Id));

                return(Unauthorized());
            }
            return(NotFound());
        }