コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }