public virtual async Task AddEmailAsync(TUser user, string email, string loginProvider = null, string loginProviderKey = null, CancellationToken cancellationToken = default(CancellationToken)) { var existingEmail = FindIdentityEmail(user, email, loginProvider); if (existingEmail != null) { existingEmail.LoginProvider = loginProvider; existingEmail.LoginProviderKey = loginProviderKey; Emails.Update(existingEmail); return; } var identityEmail = CreateIdentityEmail(user, email, loginProvider, loginProviderKey); await Emails.AddAsync(identityEmail, cancellationToken); }