Frequently Used Methods
Frequently Used Methods
Frequently Used Methods
Frequently Used Methods
public async Task ExecuteAsync(IDocumentClient client, DocumentCollection collection, Uri relativeCollectionUri) { foreach (IStoredProcedure storedProc in GetStoredProcedures()) { try { await client.ReadStoredProcedureAsync(storedProc.GetUri(relativeCollectionUri)); } catch (DocumentClientException e) when(e.StatusCode == HttpStatusCode.NotFound) { await client.CreateStoredProcedureAsync(relativeCollectionUri, storedProc.AsStoredProcedure()); } } }