aspnetboilerplate 中的确认电子邮件

Confirmation Email in aspnetboilerplate

我如何发送确认电子邮件并在 aspnetboilerplate 模板中验证确认

CheckErrors(await _userManager.CreateAsync(user));
var emailConfirmationToken = await _userManager.GenerateEmailConfirmationTokenAsync(user);

电子邮件确认令牌已生成并通过邮件发送,但我如何将其存储在数据库中以确认电子邮件

直接分配给user:

CheckErrors(await _userManager.CreateAsync(user));
await CurrentUnitOfWork.SaveChangesAsync();

var emailConfirmationToken = await _userManager.GenerateEmailConfirmationTokenAsync(user);
user.EmailConfirmationCode = emailConfirmationToken; // Here