/// <param name="loginProvider"> loginProvider </param> /// <param name="providerKey"> providerKey </param> public async Task <IUserLogin> FindLogin( int siteId, string loginProvider, string providerKey) { using (DbDataReader reader = await dbUserLogins.Find( siteId, loginProvider, providerKey)) { if (reader.Read()) { UserLogin userLogin = new UserLogin(); userLogin.LoadFromReader(reader); return(userLogin); } } return(null); }
/// <param name="loginProvider"> loginProvider </param> /// <param name="providerKey"> providerKey </param> public async Task <IUserLogin> FindLogin( int siteId, string loginProvider, string providerKey, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); using (DbDataReader reader = await dbUserLogins.Find( siteId, loginProvider, providerKey)) { if (reader.Read()) { UserLogin userLogin = new UserLogin(); userLogin.LoadFromReader(reader); return(userLogin); } } return(null); }