public async Task SetInfoAsync(ConversationInfo info) { var items = await DocumentDBRepository <ConversationInfo> .GetItemsAsync(d => d.id == info.id); var item = items.FirstOrDefault(); if (item == null) { await DocumentDBRepository <ConversationInfo> .CreateItemAsync(info); } else { await DocumentDBRepository <ConversationInfo> .UpdateItemAsync(info.id, info); } }
public async Task <ConversationInfo> GetInfoAsync(string userkey) { var items = await DocumentDBRepository <ConversationInfo> .GetItemsAsync(d => d.id == userkey); return(items.FirstOrDefault()); }
public async Task DeleteInfoAsync(string userkey) { await DocumentDBRepository <ConversationInfo> .DeleteItemAsync(userkey); }