コード例 #1
0
        public async Task <IActionResult> Put(string id, [FromBody] ProductsPurchasesViewModel item)
        {
            await _documentClient.ReplaceDocumentAsync(UriFactory.CreateDocumentUri(databaseId, collectionId, id),
                                                       item);

            return(Ok());
        }
コード例 #2
0
        public async Task <IActionResult> Post([FromBody] ProductsPurchasesViewModel item)
        {
            var response = await _documentClient.CreateDocumentAsync(UriFactory.CreateDocumentCollectionUri(databaseId, collectionId), item);

            return(Ok());
        }