public void DeleteUser(Guid id) { var user = _panelRepository.FindUser(id).Result; if (user == null) { throw new CustomException("کاربر مورد نظر یافت نشد"); } var identityResult = _panelRepository.DeleteUser(user).Result; if (!identityResult.Succeeded) { throw new CustomException(identityResult.Errors.Aggregate("", (current, error) => current + error + "\n")); } }