public virtual async Task <MeetingModel> UpdateMeeting(string id, MeetingModel meeting) { await CreateIfNeeded(); meeting.PrimaryKey = id; var dcUri = UriFactory.CreateDocumentUri(DbName, CollectionName, $"{id}-Meeting"); await client.ReplaceDocumentAsync(dcUri, meeting); return(meeting); }
public virtual async Task <MeetingModel> AddMeeting(MeetingModel meeting) { await CreateIfNeeded(); var dcUri = UriFactory.CreateDocumentCollectionUri(DbName, CollectionName); meeting.PrimaryKey = Guid.NewGuid().ToString(); await client.CreateDocumentAsync(dcUri, meeting); return(meeting); }