/// <summary> /// Returns the user information, or null, for a user with the given name /// </summary> /// <returns>The login entries.</returns> /// <param name="username">The username to get the login tokens for.</param> public virtual Task <IEnumerable <LoginEntry> > GetLoginEntriesAsync(string username) { return(m_lock.LockedAsync(() => m_connection .Select <LoginEntry>(x => x.Username == username) // Force allocation while having the lock .ToList() // And return as enumerable .AsEnumerable() )); }