public virtual async Task <ImmutableHashSet <TClient> > GetAllClientsByOwnerUserNameAsync(string ownerUserName)
 {
     return((await ClientCollection.Find(client => client.OwnerUserName == ownerUserName)
             .ToListAsync())
            .ToImmutableHashSet(new OAuthClient.OAuthClientEqualityComparer <TClient>()));
 }
 public virtual Task <TClient> GetClientByIdAsync(string id)
 {
     return(ClientCollection.Find(Builders <TClient> .Filter.Eq("Id", id)).SingleAsync());
 }