public async Task SendPasswordReset(User user) { var confirmationCode = new ConfirmationCode { UserId = user.Id, Type = ConfirmationCode.Types.PasswordReset }; await _db.ConfirmationCodes.AddAsync(confirmationCode); await _db.SaveChangesAsync(); var resource = CultureResources.PasswordReset(_userService.Culture); _ = _emailService.SendEmailAsync(user.Email, resource["subject"], GenerateMessageWithCode(beforeCode: resource["body_before_code"], code: confirmationCode.Code, afterCode: resource["body_after_code"])); }