public async Task CreateNewAccountAsync(User user) { if (user == null) { throw new ArgumentNullException(nameof(user)); } var userEmailAlreadyExist = await userSQLService.CheckIfUserEmailExists(user.Email); if (userEmailAlreadyExist) { throw new Exception(); //create new exception } user.Password = HashUserPassword(user.Password); await userSQLService.CreateNewUserAccountAsync(user); }