public virtual IEnumerable <IdentityEmailInfo> GetEmails(TUser user) { return(Emails .Include(e => e.UserLogin) .Where(e => e.UserId.Equals(user.Id)) .Select(ToEmailInfo) .ToList()); }
private TEmail FindIdentityEmail(TUser user, string email, string loginProvider) { return(Emails .Include(e => e.UserLogin) .FirstOrDefault(e => e.Email.Equals(email) && e.UserId.Equals(user.Id) && e.UserLogin.LoginProvider.Equals(loginProvider))); }