//public static async Task<NBMEUser> GetUser(string id)
        //{
        //    var users = await GetUsersAsync();

        //    return users.Where(user=>user.UserId==id).FirstOrDefault();
        //}

        public static async Task UpsertNbmeUser(NBMEUser user)
        {
            await client.UpsertDocumentAsync(UriFactory.CreateDocumentCollectionUri(DatabaseId, CollectionId), user);

            //if (GetUser(user.UserId) != null)
            //{
            //    await client.ReplaceDocumentAsync(UriFactory.CreateDocumentUri(DatabaseId, CollectionId,user.UserId), user);
            //}
            //else
            //{
            //    await client.CreateDocumentAsync(UriFactory.CreateDocumentCollectionUri(DatabaseId, CollectionId), user);
            //}
        }
 public static async Task <Document> CreateUserAsync(NBMEUser user)
 {
     return(await client.CreateDocumentAsync(
                UriFactory.CreateDocumentCollectionUri(DatabaseId, CollectionId), user));
 }