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