public bool DoesCustomerResourceExist(Guid customerId) { var collectionUri = _documentDbHelper.CreateCustomerDocumentCollectionUri(); var client = _databaseClient.CreateDocumentClient(); if (client == null) { return(false); } var customerQuery = client.CreateDocumentQuery <Document>(collectionUri, new FeedOptions() { MaxItemCount = 1 }); return(customerQuery.Where(x => x.Id == customerId.ToString()).Select(x => x.Id).AsEnumerable().Any()); }