public async Task Upsert(string id, DocumentBase <T> item)
        {
            var db = await this.db.Value;

            await db.UpsertDocument(collectionName, id, item);

            LogSave("Saved {@vm} for {documentKey}", item.VM, id);
        }
 public Task SaveAsync(DocumentBase <T> item, Func <T, string> keyFunc)
 {
     return(Upsert(keyFunc(item.VM), item));
 }