Esempio n. 1
0
        public async Task DeleteAsync(string id)
        {
            using (PasswordBoxUserManager manager = PasswordBoxUserManager.Create())
            {
                var user = await manager.FindByIdAsync(id);

                if (user != null)
                {
                    var result = await manager.DeleteAsync(user);

                    if (!result.Succeeded)
                    {
                        throw new BusinessException(result.Errors.Select(a => a.Description).ToList());
                    }
                }
            }
        }