Пример #1
0
        public async Task <IEnumerable <IApprenticeship> > GetLiveApprenticeships()
        {
            using (var client = _cosmosDbHelper.GetTcpClient())
            {
                await _cosmosDbHelper.CreateDatabaseIfNotExistsAsync(client);

                await _cosmosDbHelper.CreateDocumentCollectionIfNotExistsAsync(client,
                                                                               _cosmosSettings.ApprenticeshipCollectionId);

                return(_cosmosDbHelper.GetLiveApprenticeships(client, _cosmosSettings.ApprenticeshipCollectionId));
            }
        }