async Task ISupportService.HandleAsync(CloseSupport closeSupport) { var sql = "SELECT * FROM crm WHERE crm.id = '" + closeSupport.SupportId + "'"; var response = Client.ReadDocumentAsync(UriFactory.CreateDocumentUri(ConfigurationManager.AppSettings["DocumentDbDatabaseName"], Collection(), closeSupport.SupportId.ToString())); var resource = response.Result.Resource; resource.SetPropertyValue("EndDate", DateTime.Now); resource.SetPropertyValue("SupportDescription", closeSupport.Description); var documentCollectionLink = UriFactory.CreateDocumentCollectionUri(ConfigurationManager.AppSettings["DocumentDbDatabaseName"], "CRM"); await Client.UpsertDocumentAsync(documentCollectionLink, resource); }
public async Task Handle(CloseSupport closeSupport) { await Service.HandleAsync(closeSupport); }