├── Code files ├── Chapter02 │ └── learning_cosmos_db_02_01 │ │ ├── .DS_Store │ │ └── videogames │ │ ├── videogame1_01.json │ │ └── videogame1_02.json ├── Chapter03 │ └── learning_cosmos_db_03_01 │ │ ├── .DS_Store │ │ └── sql_queries │ │ ├── videogame_1_01.sql │ │ ├── videogame_1_02.sql │ │ ├── videogame_1_03.sql │ │ ├── videogame_1_04.sql │ │ ├── videogame_1_05.sql │ │ ├── videogame_1_06.sql │ │ ├── videogame_1_07.sql │ │ ├── videogame_1_08.sql │ │ ├── videogame_1_09.sql │ │ ├── videogame_1_10.sql │ │ ├── videogame_1_11.sql │ │ ├── videogame_1_12.sql │ │ ├── videogame_1_13.sql │ │ ├── videogame_1_14.sql │ │ ├── videogame_1_15.sql │ │ ├── videogame_1_16.sql │ │ ├── videogame_1_17.sql │ │ ├── videogame_1_18.sql │ │ ├── videogame_1_19.sql │ │ └── videogame_1_20.sql ├── Chapter04 │ └── learning_cosmos_db_04_01 │ │ └── dot_net_core_2_samples │ │ └── SampleApp1 │ │ ├── SampleApp1.sln │ │ └── SampleApp1 │ │ ├── Program.cs │ │ ├── SampleApp1.csproj │ │ └── configuration.json ├── Chapter05 │ └── learning_cosmos_db_05_01 │ │ └── SampleApp2 │ │ ├── .vs │ │ ├── SampleApp1 │ │ │ ├── DesignTimeBuild │ │ │ │ └── .dtbcache │ │ │ └── v15 │ │ │ │ ├── .suo │ │ │ │ └── Server │ │ │ │ └── sqlite3 │ │ │ │ ├── db.lock │ │ │ │ ├── storage.ide │ │ │ │ ├── storage.ide-shm │ │ │ │ └── storage.ide-wal │ │ └── config │ │ │ └── applicationhost.config │ │ ├── SampleApp1.sln │ │ └── SampleApp1 │ │ ├── Models │ │ ├── Competition.cs │ │ ├── Location.cs │ │ ├── Player.cs │ │ └── Winner.cs │ │ ├── Program.cs │ │ ├── ProgramVersion1.cs │ │ ├── SampleApp1.csproj │ │ ├── Types │ │ ├── CompetitionStatus.cs │ │ └── GamingPlatform.cs │ │ ├── bin │ │ └── Debug │ │ │ └── netcoreapp2.0 │ │ │ ├── DocumentDB.Spatial.Sql.dll │ │ │ ├── Microsoft.Azure.Documents.ServiceInterop.dll │ │ │ ├── SampleApp1.deps.json │ │ │ ├── SampleApp1.dll │ │ │ ├── SampleApp1.pdb │ │ │ ├── SampleApp1.runtimeconfig.dev.json │ │ │ ├── SampleApp1.runtimeconfig.json │ │ │ └── configuration.json │ │ ├── configuration.json │ │ └── obj │ │ ├── Debug │ │ └── netcoreapp2.0 │ │ │ ├── SampleApp1.AssemblyInfo.cs │ │ │ ├── SampleApp1.AssemblyInfoInputs.cache │ │ │ ├── SampleApp1.csproj.CoreCompileInputs.cache │ │ │ ├── SampleApp1.csproj.FileListAbsolute.txt │ │ │ ├── SampleApp1.csprojAssemblyReference.cache │ │ │ ├── SampleApp1.dll │ │ │ └── SampleApp1.pdb │ │ ├── SampleApp1.csproj.nuget.cache │ │ ├── SampleApp1.csproj.nuget.g.props │ │ ├── SampleApp1.csproj.nuget.g.targets │ │ └── project.assets.json └── Chapter06 │ └── learning_cosmos_db_06_01 │ └── SampleApp3 │ ├── .vs │ ├── SampleApp1 │ │ ├── DesignTimeBuild │ │ │ └── .dtbcache │ │ └── v15 │ │ │ ├── .suo │ │ │ └── Server │ │ │ └── sqlite3 │ │ │ ├── db.lock │ │ │ ├── storage.ide │ │ │ ├── storage.ide-shm │ │ │ └── storage.ide-wal │ └── config │ │ └── applicationhost.config │ ├── SampleApp1.sln │ └── SampleApp1 │ ├── Models │ ├── Competition.cs │ ├── Location.cs │ ├── Player.cs │ └── Winner.cs │ ├── Program.cs │ ├── SampleApp1.csproj │ ├── Types │ ├── CompetitionStatus.cs │ └── GamingPlatform.cs │ └── configuration.json ├── EPUB file └── Guide to NoSQL with Azure Cosmos DB.epub ├── LICENSE ├── MOBI file └── Guide to NoSQL with Azure Cosmos DB.mobi └── README.md /Code files/Chapter02/learning_cosmos_db_02_01/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Guide-to-NoSQL-with-Azure-Cosmos-DB/562c99197eb17b61be4f110966dc3b3984fad1f6/Code files/Chapter02/learning_cosmos_db_02_01/.DS_Store -------------------------------------------------------------------------------- /Code files/Chapter02/learning_cosmos_db_02_01/videogames/videogame1_01.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "1", 3 | "name": "Battle Royale Kingdoms", 4 | "lastCompetitionDate": "2018-09-29T04:36:22.7251173Z", 5 | "tags": [ 6 | "mobile", "2D", "card game" 7 | ], 8 | "levels": [ 9 | { 10 | "title": "Training Camp for Dummies", 11 | "towers": 2, 12 | "towerPower": 30 13 | }, 14 | { 15 | "title": "Jungle Arena", 16 | "towers": 2, 17 | "towerPower": 40 18 | }, 19 | { 20 | "title": "Legendary World", 21 | "towers": 5, 22 | "towerPower": 100 23 | } 24 | ], 25 | "highestScores": [ 26 | { 27 | "player": 28 | { 29 | "nickName": "Brandon in Wonderland", 30 | "clan": "Wonderland Warriors" 31 | }, 32 | "score": "750" 33 | } 34 | ] 35 | } -------------------------------------------------------------------------------- /Code files/Chapter02/learning_cosmos_db_02_01/videogames/videogame1_02.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "2", 3 | "name": "Fortnite vs Zombies", 4 | "lastCompetitionDate": "2018-09-30T03:31:20.7251173Z", 5 | "tags": [ 6 | "3D", "battle royale", "monsters", "shooter" 7 | ], 8 | "platforms": [ 9 | "PS4", "XBox", "PC", "Switch", "iPad", "iPhone", "Android" 10 | ], 11 | 12 | "levels": [ 13 | { 14 | "title": "Dancing in the storm", 15 | "maximumPlayers": 50, 16 | "minimumExperienceLevel": 30 17 | }, 18 | { 19 | "title": "Rainbows after the storm", 20 | "maximumPlayers": 30, 21 | "minimumExperienceLevel": 60 22 | }, 23 | { 24 | "title": "The last of us", 25 | "maximumPlayers": 10, 26 | "minimumExperienceLevel": 100 27 | } 28 | ], 29 | "highestScores": [ 30 | { 31 | "player": 32 | { 33 | "nickName": "PlaystationBoy", 34 | "clan": "USA Players", 35 | "experienceLevel": 140 36 | }, 37 | "score": "5600" 38 | }, 39 | { 40 | "player": 41 | { 42 | "nickName": "KevinSwitchMan", 43 | "clan": "Italian Warriors", 44 | "experienceLevel": 125 45 | }, 46 | "score": "3300" 47 | } 48 | ] 49 | } 50 | -------------------------------------------------------------------------------- /Code files/Chapter03/learning_cosmos_db_03_01/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Guide-to-NoSQL-with-Azure-Cosmos-DB/562c99197eb17b61be4f110966dc3b3984fad1f6/Code files/Chapter03/learning_cosmos_db_03_01/.DS_Store -------------------------------------------------------------------------------- /Code files/Chapter03/learning_cosmos_db_03_01/sql_queries/videogame_1_01.sql: -------------------------------------------------------------------------------- 1 | SELECT * 2 | FROM Videogames v 3 | WHERE v.id = '2' 4 | -------------------------------------------------------------------------------- /Code files/Chapter03/learning_cosmos_db_03_01/sql_queries/videogame_1_02.sql: -------------------------------------------------------------------------------- 1 | SELECT * 2 | FROM Videogames v 3 | WHERE v.id = '1' 4 | -------------------------------------------------------------------------------- /Code files/Chapter03/learning_cosmos_db_03_01/sql_queries/videogame_1_03.sql: -------------------------------------------------------------------------------- 1 | SELECT v.name, 2 | v.platforms 3 | FROM Videogames v 4 | ORDER BY v.name 5 | -------------------------------------------------------------------------------- /Code files/Chapter03/learning_cosmos_db_03_01/sql_queries/videogame_1_04.sql: -------------------------------------------------------------------------------- 1 | SELECT v.id 2 | FROM Videogames v 3 | WHERE IS_DEFINED(v.platforms) 4 | -------------------------------------------------------------------------------- /Code files/Chapter03/learning_cosmos_db_03_01/sql_queries/videogame_1_05.sql: -------------------------------------------------------------------------------- 1 | SELECT v.id AS videoGameId, 2 | v.name AS videoGameName, 3 | v.levels[0] AS firstLevel 4 | FROM videogames v 5 | WHERE IS_ARRAY(v.levels) 6 | -------------------------------------------------------------------------------- /Code files/Chapter03/learning_cosmos_db_03_01/sql_queries/videogame_1_06.sql: -------------------------------------------------------------------------------- 1 | SELECT TOP 1 v.id AS videoGameId, 2 | v.name AS videoGameName, 3 | v.levels[0] AS firstLevel 4 | FROM videogames v 5 | WHERE IS_ARRAY(v.levels) 6 | ORDER BY v.name 7 | -------------------------------------------------------------------------------- /Code files/Chapter03/learning_cosmos_db_03_01/sql_queries/videogame_1_07.sql: -------------------------------------------------------------------------------- 1 | SELECT v.id AS videoGameId, 2 | v.name AS videoGameName, 3 | v.levels[0] AS firstLevel 4 | FROM Videogames v 5 | WHERE IS_ARRAY(v.levels) 6 | AND ARRAY_LENGTH(v.levels) >= 1 7 | -------------------------------------------------------------------------------- /Code files/Chapter03/learning_cosmos_db_03_01/sql_queries/videogame_1_08.sql: -------------------------------------------------------------------------------- 1 | SELECT v.id AS videoGameId, 2 | v.name AS videoGameName, 3 | ARRAY_SLICE(v.levels, 1, 2) AS selectedLevels 4 | FROM Videogames v 5 | WHERE IS_ARRAY(v.levels) 6 | AND (ARRAY_LENGTH(v.levels) >= 3) 7 | -------------------------------------------------------------------------------- /Code files/Chapter03/learning_cosmos_db_03_01/sql_queries/videogame_1_09.sql: -------------------------------------------------------------------------------- 1 | SELECT v.id AS videoGameId, 2 | v.name AS videoGameName, 3 | v.tags AS videoGameTags 4 | FROM Videogames v 5 | WHERE ARRAY_CONTAINS(v.tags, "monsters") 6 | -------------------------------------------------------------------------------- /Code files/Chapter03/learning_cosmos_db_03_01/sql_queries/videogame_1_10.sql: -------------------------------------------------------------------------------- 1 | SELECT v.id AS videoGameId, 2 | v.name AS videoGameName, 3 | v.levels AS videoGameLevels 4 | FROM Videogames v 5 | WHERE ARRAY_CONTAINS(v.levels, 6 | { 7 | "title": "Rainbows after the storm", 8 | "maximumPlayers": 30, 9 | "minimumExperienceLevel": 60 10 | }) 11 | -------------------------------------------------------------------------------- /Code files/Chapter03/learning_cosmos_db_03_01/sql_queries/videogame_1_11.sql: -------------------------------------------------------------------------------- 1 | SELECT v.id AS videoGameId, 2 | v.name AS videoGameName, 3 | v.levels AS videoGameLevels 4 | FROM Videogames v 5 | WHERE ARRAY_CONTAINS(v.levels, 6 | { 7 | "title": "Jungle Arena", 8 | "towers": 2 9 | }) 10 | -------------------------------------------------------------------------------- /Code files/Chapter03/learning_cosmos_db_03_01/sql_queries/videogame_1_12.sql: -------------------------------------------------------------------------------- 1 | SELECT v.id AS videoGameId, 2 | v.name AS videoGameName, 3 | v.levels AS videoGameLevels 4 | FROM Videogames v 5 | WHERE ARRAY_CONTAINS(v.levels, 6 | { 7 | "title": "Jungle Arena", 8 | "towers": 2 9 | }, true) 10 | -------------------------------------------------------------------------------- /Code files/Chapter03/learning_cosmos_db_03_01/sql_queries/videogame_1_13.sql: -------------------------------------------------------------------------------- 1 | SELECT v.name AS videoGameName, 2 | h.player.nickName AS playerNickName, 3 | h.score AS highScore 4 | FROM Videogames v 5 | JOIN h IN v.highestScores 6 | -------------------------------------------------------------------------------- /Code files/Chapter03/learning_cosmos_db_03_01/sql_queries/videogame_1_14.sql: -------------------------------------------------------------------------------- 1 | SELECT * 2 | FROM h IN Videogames.highestScores 3 | -------------------------------------------------------------------------------- /Code files/Chapter03/learning_cosmos_db_03_01/sql_queries/videogame_1_15.sql: -------------------------------------------------------------------------------- 1 | SELECT * 2 | FROM h IN Videogames.highestScores 3 | WHERE h.player.experienceLevel > 120 4 | -------------------------------------------------------------------------------- /Code files/Chapter03/learning_cosmos_db_03_01/sql_queries/videogame_1_16.sql: -------------------------------------------------------------------------------- 1 | SELECT * 2 | FROM Videogames.highestScores h 3 | -------------------------------------------------------------------------------- /Code files/Chapter03/learning_cosmos_db_03_01/sql_queries/videogame_1_17.sql: -------------------------------------------------------------------------------- 1 | SELECT SUM(ARRAY_LENGTH(v.levels)) 2 | FROM Videogames v 3 | -------------------------------------------------------------------------------- /Code files/Chapter03/learning_cosmos_db_03_01/sql_queries/videogame_1_18.sql: -------------------------------------------------------------------------------- 1 | SELECT VALUE SUM(ARRAY_LENGTH(v.levels)) 2 | FROM Videogames v 3 | -------------------------------------------------------------------------------- /Code files/Chapter03/learning_cosmos_db_03_01/sql_queries/videogame_1_19.sql: -------------------------------------------------------------------------------- 1 | SELECT COUNT(l) AS totalNumberOfLevels 2 | FROM l IN Videogames.levels 3 | -------------------------------------------------------------------------------- /Code files/Chapter03/learning_cosmos_db_03_01/sql_queries/videogame_1_20.sql: -------------------------------------------------------------------------------- 1 | SELECT AVG(l.towerPower) AS towerPowerAverage 2 | FROM l IN Videogames.levels 3 | -------------------------------------------------------------------------------- /Code files/Chapter04/learning_cosmos_db_04_01/dot_net_core_2_samples/SampleApp1/SampleApp1.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27703.2035 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleApp1", "SampleApp1\SampleApp1.csproj", "{2242DCB1-A88B-4BC4-8092-8B236026579D}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {2242DCB1-A88B-4BC4-8092-8B236026579D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {2242DCB1-A88B-4BC4-8092-8B236026579D}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {2242DCB1-A88B-4BC4-8092-8B236026579D}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {2242DCB1-A88B-4BC4-8092-8B236026579D}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {00DD2A9E-F9CA-4A4B-85A0-3F779E1F61A9} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /Code files/Chapter04/learning_cosmos_db_04_01/dot_net_core_2_samples/SampleApp1/SampleApp1/Program.cs: -------------------------------------------------------------------------------- 1 | namespace SampleApp1 2 | { 3 | using Microsoft.Azure.Documents; 4 | using Microsoft.Azure.Documents.Client; 5 | using Microsoft.Azure.Documents.Linq; 6 | using Microsoft.Extensions.Configuration; 7 | using System; 8 | using System.Linq; 9 | using System.Threading.Tasks; 10 | 11 | public class Program 12 | { 13 | private static string databaseId; 14 | private static string collectionId; 15 | private static DocumentClient client; 16 | 17 | public static void Main(string[] args) 18 | { 19 | var configurationBuilder = new ConfigurationBuilder(); 20 | configurationBuilder.AddJsonFile("configuration.json", optional: false, reloadOnChange: false); 21 | var configuration = configurationBuilder.Build(); 22 | string endpointUrl = configuration["CosmosDB:endpointUrl"]; 23 | string authorizationKey = configuration["CosmosDB:authorizationKey"]; 24 | databaseId = configuration["CosmosDB:databaseId"]; 25 | collectionId = configuration["CosmosDB:collectionId"]; 26 | try 27 | { 28 | using (client = new DocumentClient(new Uri(endpointUrl), authorizationKey)) 29 | { 30 | CreateAndQueryDynamicDocumentsAsync().Wait(); 31 | } 32 | } 33 | catch (DocumentClientException dce) 34 | { 35 | var baseException = dce.GetBaseException(); 36 | Console.WriteLine( 37 | $"DocumentClientException occurred. Status code: {dce.StatusCode}; Message: {dce.Message}; Base exception message: {baseException.Message}"); 38 | } 39 | catch (Exception e) 40 | { 41 | var baseException = e.GetBaseException(); 42 | Console.WriteLine( 43 | $"Exception occurred. Message: {e.Message}; Base exception message: {baseException.Message}"); 44 | } 45 | finally 46 | { 47 | Console.WriteLine("Press any key to exit the console application."); 48 | Console.ReadKey(); 49 | } 50 | } 51 | 52 | private static async Task RetrieveOrCreateDatabaseAsync() 53 | { 54 | // Create a new document database if it doesn’t exist 55 | var databaseResponse = await client.CreateDatabaseIfNotExistsAsync( 56 | new Database 57 | { 58 | Id = databaseId, 59 | }); 60 | switch (databaseResponse.StatusCode) 61 | { 62 | case System.Net.HttpStatusCode.Created: 63 | Console.WriteLine($"The database {databaseId} has been created."); 64 | break; 65 | case System.Net.HttpStatusCode.OK: 66 | Console.WriteLine($"The database {databaseId} has been retrieved."); 67 | break; 68 | } 69 | return databaseResponse.Resource; 70 | } 71 | 72 | private static async Task CreateCollectionIfNotExistsAsync() 73 | { 74 | var databaseUri = UriFactory.CreateDatabaseUri(databaseId); 75 | DocumentCollection documentCollectionResource; 76 | var isCollectionCreated = await client.CreateDocumentCollectionQuery(databaseUri) 77 | .Where(c => c.Id == collectionId) 78 | .CountAsync() == 1; 79 | if (isCollectionCreated) 80 | { 81 | Console.WriteLine($"The collection {collectionId} already exists."); 82 | var documentCollectionUri = UriFactory.CreateDocumentCollectionUri(databaseId, collectionId); 83 | var documentCollectionResponse = await client.ReadDocumentCollectionAsync(documentCollectionUri); 84 | documentCollectionResource = documentCollectionResponse.Resource; 85 | } 86 | else 87 | { 88 | var documentCollection = new DocumentCollection 89 | { 90 | Id = collectionId, 91 | }; 92 | documentCollection.PartitionKey.Paths.Add("/location/zipCode"); 93 | var uniqueKey = new UniqueKey(); 94 | uniqueKey.Paths.Add("/title"); 95 | documentCollection.UniqueKeyPolicy.UniqueKeys.Add(uniqueKey); 96 | var requestOptions = new RequestOptions 97 | { 98 | OfferThroughput = 1000, 99 | }; 100 | var collectionResponse = await client.CreateDocumentCollectionAsync( 101 | databaseUri, 102 | documentCollection, 103 | requestOptions); 104 | if (collectionResponse.StatusCode == System.Net.HttpStatusCode.Created) 105 | { 106 | Console.WriteLine($"The collection {collectionId} has been created."); 107 | } 108 | documentCollectionResource = collectionResponse.Resource; 109 | } 110 | 111 | return documentCollectionResource; 112 | } 113 | 114 | private static async Task GetCompetitionByTitle(string title) 115 | { 116 | // Build a query to retrieve a document with a specific title 117 | var collectionUri = UriFactory.CreateDocumentCollectionUri(databaseId, collectionId); 118 | var documentQuery = client.CreateDocumentQuery(collectionUri, 119 | $"SELECT * FROM Competitions c WHERE c.title = '{title}'", 120 | new FeedOptions() 121 | { 122 | EnableCrossPartitionQuery = true, 123 | MaxItemCount = 1, 124 | }) 125 | .AsDocumentQuery(); 126 | while (documentQuery.HasMoreResults) 127 | { 128 | foreach (var competition in await documentQuery.ExecuteNextAsync()) 129 | { 130 | Console.WriteLine( 131 | $"The document with the following title exists: {title}"); 132 | Console.WriteLine(competition); 133 | return competition; 134 | } 135 | } 136 | 137 | // No matching document found 138 | return null; 139 | } 140 | 141 | private static async Task InsertCompetition1(string competitionId, 142 | string competitionTitle, 143 | string competitionLocationZipCode) 144 | { 145 | // Insert a document related to a competition that has finished and has winners 146 | var collectionUri = UriFactory.CreateDocumentCollectionUri(databaseId, collectionId); 147 | var documentResponse = await client.CreateDocumentAsync(collectionUri, new 148 | { 149 | id = competitionId, 150 | title = competitionTitle, 151 | location = new 152 | { 153 | zipCode = competitionLocationZipCode, 154 | state = "CA", 155 | }, 156 | platforms = new[] 157 | { 158 | "PS4", "XBox", "Switch" 159 | }, 160 | games = new[] 161 | { 162 | "Fortnite", "NBA Live 19" 163 | }, 164 | numberOfRegisteredCompetitors = 80, 165 | numberOfCompetitors = 60, 166 | numberOfViewers = 300, 167 | status = "Finished", 168 | dateTime = DateTime.UtcNow.AddDays(-50), 169 | winners = new[] 170 | { 171 | new 172 | { 173 | player = new 174 | { 175 | nickName = "EnzoTheGreatest", 176 | country = "Italy", 177 | city = "Rome" 178 | }, 179 | position = 1, 180 | score = 7500, 181 | prize = 1500, 182 | }, 183 | new 184 | { 185 | player = new 186 | { 187 | nickName = "NicoInGamerLand", 188 | country = "Argentina", 189 | city = "Buenos Aires" 190 | }, 191 | position = 2, 192 | score = 6500, 193 | prize = 750, 194 | }, 195 | new 196 | { 197 | player = new 198 | { 199 | nickName = "KiwiBoy", 200 | country = "New Zealand", 201 | city = "Auckland" 202 | }, 203 | position = 3, 204 | score = 3500, 205 | prize = 250, 206 | } 207 | }, 208 | }); 209 | 210 | if (documentResponse.StatusCode == System.Net.HttpStatusCode.Created) 211 | { 212 | Console.WriteLine($"The competition with the title {competitionTitle} has been created."); 213 | } 214 | 215 | return documentResponse.Resource; 216 | } 217 | 218 | private static async Task UpdateScheduledCompetition(string competitionId, 219 | string competitionLocationZipCode, 220 | DateTime newDateTime, 221 | int newNumberOfRegisteredCompetitors) 222 | { 223 | // Retrieve a document related to a competition that is scheduled 224 | // and update its date and its number of registered competitors 225 | // The read operation requires the partition key 226 | var documentToUpdateUri = UriFactory.CreateDocumentUri(databaseId, collectionId, competitionId); 227 | var readDocumentResponse = await client.ReadDocumentAsync(documentToUpdateUri, new RequestOptions() 228 | { 229 | PartitionKey = new PartitionKey(competitionLocationZipCode) 230 | }); 231 | ((dynamic)readDocumentResponse.Resource).dateTime = newDateTime; 232 | ((dynamic)readDocumentResponse.Resource).numberOfRegisteredCompetitors = newNumberOfRegisteredCompetitors; 233 | ResourceResponse updatedDocumentResponse = await client.ReplaceDocumentAsync( 234 | documentToUpdateUri, 235 | readDocumentResponse.Resource); 236 | 237 | if (updatedDocumentResponse.StatusCode == System.Net.HttpStatusCode.OK) 238 | { 239 | Console.WriteLine($"The competition with id {competitionId} has been updated."); 240 | } 241 | 242 | return updatedDocumentResponse.Resource; 243 | } 244 | 245 | private static async Task InsertCompetition2(string competitionId, 246 | string competitionTitle, 247 | string competitionLocationZipCode) 248 | { 249 | // Insert a document related to a competition that is scheduled 250 | // and doesn’t have winners yet 251 | var collectionUri = UriFactory.CreateDocumentCollectionUri(databaseId, collectionId); 252 | var documentResponse = await client.CreateDocumentAsync(collectionUri, new 253 | { 254 | id = competitionId, 255 | title = competitionTitle, 256 | location = new 257 | { 258 | zipCode = competitionLocationZipCode, 259 | state = "CA", 260 | }, 261 | platforms = new[] 262 | { 263 | "PC", "PS4", "XBox" 264 | }, 265 | games = new[] 266 | { 267 | "Madden NFL 19", "Fortnite" 268 | }, 269 | numberOfRegisteredCompetitors = 160, 270 | status = "Scheduled", 271 | dateTime = DateTime.UtcNow.AddDays(50), 272 | }); 273 | 274 | if (documentResponse.StatusCode == System.Net.HttpStatusCode.Created) 275 | { 276 | Console.WriteLine($"The competition with the title {competitionTitle} has been created."); 277 | } 278 | 279 | return documentResponse.Resource; 280 | } 281 | 282 | private static async Task DoesCompetitionWithTitleExist(string competitionTitle) 283 | { 284 | bool exists = false; 285 | // Retrieve the number of documents with a specific title 286 | // Very important: Cross partition queries only support 'VALUE ' for aggregates 287 | var collectionUri = UriFactory.CreateDocumentCollectionUri(databaseId, collectionId); 288 | var documentCountQuery = client.CreateDocumentQuery(collectionUri, 289 | $"SELECT VALUE COUNT(1) FROM Competitions c WHERE c.title = '{competitionTitle}'", 290 | new FeedOptions() 291 | { 292 | EnableCrossPartitionQuery = true, 293 | MaxItemCount = 1, 294 | }) 295 | .AsDocumentQuery(); 296 | while (documentCountQuery.HasMoreResults) 297 | { 298 | var documentCountQueryResult = await documentCountQuery.ExecuteNextAsync(); 299 | exists = (documentCountQueryResult.FirstOrDefault() == 1); 300 | } 301 | 302 | return exists; 303 | } 304 | 305 | private static async Task ListScheduledCompetitions() 306 | { 307 | // Retrieve the titles for all the scheduled competitions that have more than 200 registered competitors 308 | var collectionUri = UriFactory.CreateDocumentCollectionUri(databaseId, collectionId); 309 | var selectTitleQuery = client.CreateDocumentQuery(collectionUri, 310 | $"SELECT VALUE c.title FROM Competitions c WHERE c.numberOfRegisteredCompetitors > 200 AND c.status = 'Scheduled'", 311 | new FeedOptions() 312 | { 313 | EnableCrossPartitionQuery = true, 314 | MaxItemCount = 100, 315 | }) 316 | .AsDocumentQuery(); 317 | while (selectTitleQuery.HasMoreResults) 318 | { 319 | var selectTitleQueryResult = await selectTitleQuery.ExecuteNextAsync(); 320 | foreach (var title in selectTitleQueryResult) 321 | { 322 | Console.WriteLine(title); 323 | } 324 | } 325 | } 326 | 327 | private static async Task CreateAndQueryDynamicDocumentsAsync() 328 | { 329 | var database = await RetrieveOrCreateDatabaseAsync(); 330 | Console.WriteLine( 331 | $"The database {databaseId} is available for operations with the following AltLink: {database.AltLink}"); 332 | var collection = await CreateCollectionIfNotExistsAsync(); 333 | Console.WriteLine( 334 | $"The collection {collectionId} is available for operations with the following AltLink: {collection.AltLink}"); 335 | string competition1Id = "1"; 336 | string competition1Title = "Crowns for Gamers - Portland 2018"; 337 | string competition1ZipCode = "90210"; 338 | var competition1 = await GetCompetitionByTitle(competition1Title); 339 | if (competition1 == null) 340 | { 341 | competition1 = await InsertCompetition1(competition1Id, competition1Title, competition1ZipCode); 342 | } 343 | 344 | string competition2Title = "Defenders of the crown - San Diego 2018"; 345 | bool isCompetition2Inserted = await DoesCompetitionWithTitleExist(competition2Title); 346 | string competition2Id = "2"; 347 | string competition2LocationZipCode = "92075"; 348 | if (isCompetition2Inserted) 349 | { 350 | Console.WriteLine( 351 | $"The document with the following title exists: {competition2Title}"); 352 | } 353 | else 354 | { 355 | var competition2 = await InsertCompetition2(competition2Id, competition2Title, competition2LocationZipCode); 356 | } 357 | 358 | var updatedCompetition2 = await UpdateScheduledCompetition(competition2Id, 359 | competition2LocationZipCode, 360 | DateTime.UtcNow.AddDays(60), 361 | 250); 362 | 363 | await ListScheduledCompetitions(); 364 | } 365 | } 366 | } 367 | -------------------------------------------------------------------------------- /Code files/Chapter04/learning_cosmos_db_04_01/dot_net_core_2_samples/SampleApp1/SampleApp1/SampleApp1.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | PreserveNewest 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Code files/Chapter04/learning_cosmos_db_04_01/dot_net_core_2_samples/SampleApp1/SampleApp1/configuration.json: -------------------------------------------------------------------------------- 1 | // Development configuration values 2 | { 3 | "CosmosDB": { 4 | // Replace with the endpoint URL for your Azure Cosmos DB account 5 | "endpointUrl": "Replace with the endpoint URL for your Azure Cosmos DB account", 6 | // Replace with the read-write primary key for your Azure Cosmos DB account 7 | "authorizationKey": "Replace with the read-write primary key for your Azure Cosmos DB account", 8 | // Replace with your desired database id 9 | "databaseId": "Competition", 10 | // Replace with your desired collection id 11 | "collectionId": "Competitions1" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/.vs/SampleApp1/DesignTimeBuild/.dtbcache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Guide-to-NoSQL-with-Azure-Cosmos-DB/562c99197eb17b61be4f110966dc3b3984fad1f6/Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/.vs/SampleApp1/DesignTimeBuild/.dtbcache -------------------------------------------------------------------------------- /Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/.vs/SampleApp1/v15/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Guide-to-NoSQL-with-Azure-Cosmos-DB/562c99197eb17b61be4f110966dc3b3984fad1f6/Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/.vs/SampleApp1/v15/.suo -------------------------------------------------------------------------------- /Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/.vs/SampleApp1/v15/Server/sqlite3/db.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Guide-to-NoSQL-with-Azure-Cosmos-DB/562c99197eb17b61be4f110966dc3b3984fad1f6/Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/.vs/SampleApp1/v15/Server/sqlite3/db.lock -------------------------------------------------------------------------------- /Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/.vs/SampleApp1/v15/Server/sqlite3/storage.ide: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Guide-to-NoSQL-with-Azure-Cosmos-DB/562c99197eb17b61be4f110966dc3b3984fad1f6/Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/.vs/SampleApp1/v15/Server/sqlite3/storage.ide -------------------------------------------------------------------------------- /Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/.vs/SampleApp1/v15/Server/sqlite3/storage.ide-shm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Guide-to-NoSQL-with-Azure-Cosmos-DB/562c99197eb17b61be4f110966dc3b3984fad1f6/Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/.vs/SampleApp1/v15/Server/sqlite3/storage.ide-shm -------------------------------------------------------------------------------- /Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/.vs/SampleApp1/v15/Server/sqlite3/storage.ide-wal: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Guide-to-NoSQL-with-Azure-Cosmos-DB/562c99197eb17b61be4f110966dc3b3984fad1f6/Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/.vs/SampleApp1/v15/Server/sqlite3/storage.ide-wal -------------------------------------------------------------------------------- /Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/SampleApp1.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27703.2035 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleApp1", "SampleApp1\SampleApp1.csproj", "{2242DCB1-A88B-4BC4-8092-8B236026579D}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {2242DCB1-A88B-4BC4-8092-8B236026579D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {2242DCB1-A88B-4BC4-8092-8B236026579D}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {2242DCB1-A88B-4BC4-8092-8B236026579D}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {2242DCB1-A88B-4BC4-8092-8B236026579D}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {00DD2A9E-F9CA-4A4B-85A0-3F779E1F61A9} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/SampleApp1/Models/Competition.cs: -------------------------------------------------------------------------------- 1 | namespace SampleApp1.Models 2 | { 3 | using Microsoft.Azure.Documents; 4 | using Newtonsoft.Json; 5 | using Newtonsoft.Json.Converters; 6 | using SampleApp1.Types; 7 | using System; 8 | 9 | public class Competition: Document 10 | { 11 | [JsonProperty(PropertyName = "title")] 12 | public string Title { get; set; } 13 | 14 | [JsonProperty(PropertyName = "location")] 15 | public Location Location { get; set; } 16 | 17 | [JsonProperty(PropertyName = "platforms")] 18 | public GamingPlatform[] Platforms { get; set; } 19 | 20 | [JsonProperty(PropertyName = "games")] 21 | public string[] Games { get; set; } 22 | 23 | [JsonProperty(PropertyName = "numberOfRegisteredCompetitors")] 24 | public int NumberOfRegisteredCompetitors { get; set; } 25 | 26 | [JsonProperty(PropertyName = "numberOfCompetitors")] 27 | public int NumberOfCompetitors { get; set; } 28 | 29 | [JsonProperty(PropertyName = "numberOfViewers")] 30 | public int NumberOfViewers { get; set; } 31 | 32 | [JsonProperty(PropertyName = "status")] 33 | [JsonConverter(typeof(StringEnumConverter))] 34 | public CompetitionStatus Status { get; set; } 35 | 36 | [JsonProperty(PropertyName = "dateTime")] 37 | public DateTime DateTime { get; set; } 38 | 39 | [JsonProperty(PropertyName = "winners")] 40 | public Winner[] Winners { get; set; } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/SampleApp1/Models/Location.cs: -------------------------------------------------------------------------------- 1 | namespace SampleApp1.Models 2 | { 3 | using Newtonsoft.Json; 4 | 5 | public class Location 6 | { 7 | [JsonProperty(PropertyName = "zipCode")] 8 | public string ZipCode { get; set; } 9 | 10 | [JsonProperty(PropertyName = "state")] 11 | public string State { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/SampleApp1/Models/Player.cs: -------------------------------------------------------------------------------- 1 | namespace SampleApp1.Models 2 | { 3 | using Newtonsoft.Json; 4 | 5 | public class Player 6 | { 7 | [JsonProperty(PropertyName = "nickName")] 8 | public string NickName { get; set; } 9 | 10 | [JsonProperty(PropertyName = "country")] 11 | public string Country { get; set; } 12 | 13 | [JsonProperty(PropertyName = "city")] 14 | public string City { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/SampleApp1/Models/Winner.cs: -------------------------------------------------------------------------------- 1 | namespace SampleApp1.Models 2 | { 3 | using Newtonsoft.Json; 4 | 5 | public class Winner 6 | { 7 | [JsonProperty(PropertyName = "player")] 8 | public Player Player { get; set; } 9 | 10 | [JsonProperty(PropertyName = "position")] 11 | public int Position { get; set; } 12 | 13 | [JsonProperty(PropertyName = "score")] 14 | public int Score { get; set; } 15 | 16 | [JsonProperty(PropertyName = "prize")] 17 | public int Prize { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/SampleApp1/Program.cs: -------------------------------------------------------------------------------- 1 | namespace SampleApp1 2 | { 3 | using Microsoft.Azure.Documents; 4 | using Microsoft.Azure.Documents.Client; 5 | using Microsoft.Azure.Documents.Linq; 6 | using Microsoft.Extensions.Configuration; 7 | using System; 8 | using System.Linq; 9 | using System.Threading.Tasks; 10 | using SampleApp1.Models; 11 | using SampleApp1.Types; 12 | using System.Collections.Generic; 13 | 14 | public class Program 15 | { 16 | private static string databaseId; 17 | private static string collectionId; 18 | private static DocumentClient client; 19 | private static Uri collectionUri; 20 | 21 | public static void Main(string[] args) 22 | { 23 | var configurationBuilder = new ConfigurationBuilder(); 24 | configurationBuilder.AddJsonFile("configuration.json", optional: false, reloadOnChange: false); 25 | var configuration = configurationBuilder.Build(); 26 | string endpointUrl = configuration["CosmosDB:endpointUrl"]; 27 | string authorizationKey = configuration["CosmosDB:authorizationKey"]; 28 | databaseId = configuration["CosmosDB:databaseId"]; 29 | collectionId = configuration["CosmosDB:collectionId"]; 30 | try 31 | { 32 | using (client = new DocumentClient(new Uri(endpointUrl), authorizationKey)) 33 | { 34 | CreateAndQueryCompetitionsWithLinqAsync().Wait(); 35 | } 36 | } 37 | catch (DocumentClientException dce) 38 | { 39 | var baseException = dce.GetBaseException(); 40 | Console.WriteLine( 41 | $"DocumentClientException occurred. Status code: {dce.StatusCode}; Message: {dce.Message}; Base exception message: {baseException.Message}"); 42 | } 43 | catch (Exception e) 44 | { 45 | var baseException = e.GetBaseException(); 46 | Console.WriteLine( 47 | $"Exception occurred. Message: {e.Message}; Base exception message: {baseException.Message}"); 48 | } 49 | finally 50 | { 51 | Console.WriteLine("Press any key to exit the console application."); 52 | Console.ReadKey(); 53 | } 54 | } 55 | 56 | private static async Task RetrieveOrCreateDatabaseAsync() 57 | { 58 | // Create a new document database if it doesn’t exist 59 | var databaseResponse = await client.CreateDatabaseIfNotExistsAsync( 60 | new Database 61 | { 62 | Id = databaseId, 63 | }); 64 | switch (databaseResponse.StatusCode) 65 | { 66 | case System.Net.HttpStatusCode.Created: 67 | Console.WriteLine($"The database {databaseId} has been created."); 68 | break; 69 | case System.Net.HttpStatusCode.OK: 70 | Console.WriteLine($"The database {databaseId} has been retrieved."); 71 | break; 72 | } 73 | return databaseResponse.Resource; 74 | } 75 | 76 | private static async Task CreateCollectionIfNotExistsAsync() 77 | { 78 | var databaseUri = UriFactory.CreateDatabaseUri(databaseId); 79 | DocumentCollection documentCollectionResource; 80 | var isCollectionCreated = await client.CreateDocumentCollectionQuery(databaseUri) 81 | .Where(c => c.Id == collectionId) 82 | .CountAsync() == 1; 83 | if (isCollectionCreated) 84 | { 85 | Console.WriteLine($"The collection {collectionId} already exists."); 86 | var documentCollectionUri = UriFactory.CreateDocumentCollectionUri(databaseId, collectionId); 87 | var documentCollectionResponse = await client.ReadDocumentCollectionAsync(documentCollectionUri); 88 | documentCollectionResource = documentCollectionResponse.Resource; 89 | } 90 | else 91 | { 92 | var documentCollection = new DocumentCollection 93 | { 94 | Id = collectionId, 95 | }; 96 | documentCollection.PartitionKey.Paths.Add("/location/zipCode"); 97 | var uniqueKey = new UniqueKey(); 98 | uniqueKey.Paths.Add("/title"); 99 | documentCollection.UniqueKeyPolicy.UniqueKeys.Add(uniqueKey); 100 | var requestOptions = new RequestOptions 101 | { 102 | OfferThroughput = 1000, 103 | }; 104 | var collectionResponse = await client.CreateDocumentCollectionAsync( 105 | databaseUri, 106 | documentCollection, 107 | requestOptions); 108 | if (collectionResponse.StatusCode == System.Net.HttpStatusCode.Created) 109 | { 110 | Console.WriteLine($"The collection {collectionId} has been created."); 111 | } 112 | documentCollectionResource = collectionResponse.Resource; 113 | } 114 | 115 | return documentCollectionResource; 116 | } 117 | 118 | private static async Task GetCompetitionByTitleWithLinq(string title) 119 | { 120 | // Build a query to retrieve a Competition with a specific title 121 | var documentQuery = client.CreateDocumentQuery(collectionUri, 122 | new FeedOptions() 123 | { 124 | EnableCrossPartitionQuery = true, 125 | MaxItemCount = 1, 126 | }) 127 | .Where(c => c.Title == title) 128 | .Select(c => c) 129 | .AsDocumentQuery(); 130 | while (documentQuery.HasMoreResults) 131 | { 132 | foreach (var competition in await documentQuery.ExecuteNextAsync()) 133 | { 134 | Console.WriteLine( 135 | $"The Competition with the following title exists: {title}"); 136 | Console.WriteLine(competition); 137 | return competition; 138 | } 139 | } 140 | 141 | // No matching document found 142 | return null; 143 | } 144 | 145 | private static async Task InsertCompetition(Competition competition) 146 | { 147 | var documentResponse = await client.CreateDocumentAsync(collectionUri, competition); 148 | 149 | if (documentResponse.StatusCode == System.Net.HttpStatusCode.Created) 150 | { 151 | Console.WriteLine($"The {competition.Status} competition with the title {competition.Title} has been created."); 152 | } 153 | 154 | Competition insertedCompetition = (dynamic) documentResponse.Resource; 155 | return insertedCompetition; 156 | } 157 | 158 | private static async Task InsertCompetition3() 159 | { 160 | var competition = new Competition 161 | { 162 | Id = "3", 163 | Title = "League of legends - San Diego 2018", 164 | Location = new Location 165 | { 166 | ZipCode = "92075", 167 | State = "CA" 168 | }, 169 | Platforms = new[] 170 | { 171 | GamingPlatform.Switch 172 | }, 173 | Games = new[] 174 | { 175 | "Fortnite", "NBA Live 19", "PES 2019" 176 | }, 177 | NumberOfRegisteredCompetitors = 80, 178 | NumberOfCompetitors = 30, 179 | NumberOfViewers = 390, 180 | Status = CompetitionStatus.Finished, 181 | DateTime = DateTime.UtcNow.AddDays(-20), 182 | Winners = new[] 183 | { 184 | new Winner 185 | { 186 | Player = new Player 187 | { 188 | NickName = "BrandonMilazzo", 189 | Country = "Italy", 190 | City = "Milazzo" 191 | }, 192 | Position = 1, 193 | Score = 12850, 194 | Prize = 800 195 | }, 196 | new Winner 197 | { 198 | Player = new Player 199 | { 200 | NickName = "Kevin Maverick", 201 | Country = "Ireland", 202 | City = "Dublin" 203 | }, 204 | Position = 2, 205 | Score = 12500, 206 | Prize = 400 207 | }, 208 | }, 209 | }; 210 | 211 | return await InsertCompetition(competition); 212 | } 213 | 214 | private static async Task InsertCompetition4() 215 | { 216 | // Insert a document related to a competition that is scheduled 217 | // and doesn’t have winners yet 218 | var competition = new Competition 219 | { 220 | Id = "4", 221 | Title = "League of legends - San Diego 2019", 222 | Location = new Location 223 | { 224 | ZipCode = "92075", 225 | State = "CA" 226 | }, 227 | Platforms = new[] 228 | { 229 | GamingPlatform.Switch, GamingPlatform.PC, GamingPlatform.XBox 230 | }, 231 | Games = new[] 232 | { 233 | "Madden NFL 19", "Fortnite" 234 | }, 235 | Status = CompetitionStatus.Scheduled, 236 | DateTime = DateTime.UtcNow.AddDays(300), 237 | }; 238 | 239 | return await InsertCompetition(competition); 240 | } 241 | 242 | private static async Task DoesCompetitionWithTitleExistWithLinq(string competitionTitle) 243 | { 244 | var competitionsCount = await client.CreateDocumentQuery(collectionUri, 245 | new FeedOptions() 246 | { 247 | EnableCrossPartitionQuery = true, 248 | MaxItemCount = 1, 249 | }) 250 | .Where(c => c.Title == competitionTitle) 251 | .CountAsync(); 252 | 253 | return (competitionsCount == 1); 254 | } 255 | 256 | private static async Task UpdateScheduledCompetitionWithPlatforms(string competitionId, 257 | string competitionLocationZipCode, 258 | DateTime newDateTime, 259 | int newNumberOfRegisteredCompetitors, 260 | IList newGamingPlatforms) 261 | { 262 | // Retrieve a document related to a competition that is scheduled 263 | // and update its date, number of registered competitors and platforms 264 | // The read operation requires the partition key 265 | var documentToUpdateUri = UriFactory.CreateDocumentUri(databaseId, collectionId, competitionId); 266 | var readCompetitionResponse = await client.ReadDocumentAsync(documentToUpdateUri, new RequestOptions() 267 | { 268 | PartitionKey = new PartitionKey(competitionLocationZipCode) 269 | }); 270 | readCompetitionResponse.Document.DateTime = newDateTime; 271 | readCompetitionResponse.Document.NumberOfRegisteredCompetitors = newNumberOfRegisteredCompetitors; 272 | readCompetitionResponse.Document.Platforms = newGamingPlatforms.ToArray(); 273 | 274 | var updatedCompetitionResponse = await client.ReplaceDocumentAsync( 275 | documentToUpdateUri, 276 | readCompetitionResponse.Document); 277 | 278 | if (updatedCompetitionResponse.StatusCode == System.Net.HttpStatusCode.OK) 279 | { 280 | Console.WriteLine($"The competition with id {competitionId} has been updated."); 281 | } 282 | 283 | Competition updatedCompetition = (dynamic)updatedCompetitionResponse.Resource; 284 | return updatedCompetition; 285 | } 286 | 287 | private static async Task InsertCompetition2(string competitionId, 288 | string competitionTitle, 289 | string competitionLocationZipCode) 290 | { 291 | // Insert a document related to a competition that is scheduled 292 | // and doesn’t have winners yet 293 | var collectionUri = UriFactory.CreateDocumentCollectionUri(databaseId, collectionId); 294 | var documentResponse = await client.CreateDocumentAsync(collectionUri, new 295 | { 296 | id = competitionId, 297 | title = competitionTitle, 298 | location = new 299 | { 300 | zipCode = competitionLocationZipCode, 301 | state = "CA", 302 | }, 303 | platforms = new[] 304 | { 305 | "PC", "PS4", "XBox" 306 | }, 307 | games = new[] 308 | { 309 | "Madden NFL 19", "Fortnite" 310 | }, 311 | numberOfRegisteredCompetitors = 160, 312 | status = "Scheduled", 313 | dateTime = DateTime.UtcNow.AddDays(50), 314 | }); 315 | 316 | if (documentResponse.StatusCode == System.Net.HttpStatusCode.Created) 317 | { 318 | Console.WriteLine($"The competition with the title {competitionTitle} has been created."); 319 | } 320 | 321 | return documentResponse.Resource; 322 | } 323 | 324 | private static async Task DoesCompetitionWithTitleExist(string competitionTitle) 325 | { 326 | bool exists = false; 327 | // Retrieve the number of documents with a specific title 328 | // Very important: Cross partition queries only support 'VALUE ' for aggregates 329 | var collectionUri = UriFactory.CreateDocumentCollectionUri(databaseId, collectionId); 330 | var documentCountQuery = client.CreateDocumentQuery(collectionUri, 331 | $"SELECT VALUE COUNT(1) FROM Competitions c WHERE c.title = '{competitionTitle}'", 332 | new FeedOptions() 333 | { 334 | EnableCrossPartitionQuery = true, 335 | MaxItemCount = 1, 336 | }) 337 | .AsDocumentQuery(); 338 | while (documentCountQuery.HasMoreResults) 339 | { 340 | var documentCountQueryResult = await documentCountQuery.ExecuteNextAsync(); 341 | exists = (documentCountQueryResult.FirstOrDefault() == 1); 342 | } 343 | 344 | return exists; 345 | } 346 | 347 | private static async Task ListScheduledCompetitionsWithLinq() 348 | { 349 | // Retrieve the titles for all the scheduled competitions that have more than 5 registered competitors 350 | var selectTitleQuery = client.CreateDocumentQuery(collectionUri, 351 | new FeedOptions() 352 | { 353 | EnableCrossPartitionQuery = true, 354 | MaxItemCount = 100, 355 | }) 356 | .Where(c => (c.NumberOfRegisteredCompetitors > 5) 357 | && (c.Status == CompetitionStatus.Scheduled)) 358 | .Select(c => c.Title) 359 | .AsDocumentQuery(); 360 | 361 | while (selectTitleQuery.HasMoreResults) 362 | { 363 | var selectTitleQueryResult = await selectTitleQuery.ExecuteNextAsync(); 364 | foreach (var title in selectTitleQueryResult) 365 | { 366 | Console.WriteLine(title); 367 | } 368 | } 369 | } 370 | 371 | private static async Task ListFinishedCompetitionsFirstWinner(GamingPlatform gamingPlatform, string zipCode) 372 | { 373 | // Retrieve the winner with the first position for all the finished competitions 374 | // that allowed the platform received as an argument 375 | // and located in the zipCode received as an argument. 376 | var winnersQuery = client.CreateDocumentQuery(collectionUri, 377 | new FeedOptions() 378 | { 379 | MaxItemCount = 100, 380 | }) 381 | .Where(c => (c.Location.ZipCode == zipCode) 382 | && (c.Status == CompetitionStatus.Finished) 383 | && (c.Platforms.Contains(gamingPlatform))) 384 | .Select(c => c.Winners[0]) 385 | .AsDocumentQuery(); 386 | 387 | while (winnersQuery.HasMoreResults) 388 | { 389 | var winnersQueryResult = await winnersQuery.ExecuteNextAsync(); 390 | foreach (var winner in winnersQueryResult) 391 | { 392 | Console.WriteLine($"Nickname: {winner.Player.NickName}, Score: {winner.Score}"); 393 | } 394 | } 395 | } 396 | 397 | private static async Task CreateAndQueryCompetitionsWithLinqAsync() 398 | { 399 | var database = await RetrieveOrCreateDatabaseAsync(); 400 | Console.WriteLine( 401 | $"The database {databaseId} is available for operations with the following AltLink: {database.AltLink}"); 402 | var collection = await CreateCollectionIfNotExistsAsync(); 403 | Console.WriteLine( 404 | $"The collection {collectionId} is available for operations with the following AltLink: {collection.AltLink}"); 405 | collectionUri = UriFactory.CreateDocumentCollectionUri(databaseId, collectionId); 406 | var competition3 = await GetCompetitionByTitleWithLinq("League of legends - San Diego 2018"); 407 | if (competition3 == null) 408 | { 409 | competition3 = await InsertCompetition3(); 410 | } 411 | 412 | bool isCompetition4Inserted = await DoesCompetitionWithTitleExistWithLinq("League of legends - San Diego 2019"); 413 | Competition competition4; 414 | if (isCompetition4Inserted) 415 | { 416 | competition4 = await GetCompetitionByTitleWithLinq("League of legends - San Diego 2019"); 417 | Console.WriteLine( 418 | $"The {competition4.Status} competition with the following title exists: {competition4.Title}"); 419 | } 420 | else 421 | { 422 | competition4 = await InsertCompetition4(); 423 | } 424 | 425 | var updatedCompetition4 = await UpdateScheduledCompetitionWithPlatforms("4", 426 | "92075", 427 | DateTime.UtcNow.AddDays(300), 428 | 10, 429 | new List 430 | { 431 | GamingPlatform.PC, GamingPlatform.XBox 432 | }); 433 | 434 | await ListScheduledCompetitionsWithLinq(); 435 | await ListFinishedCompetitionsFirstWinner(GamingPlatform.PS4, "90210"); 436 | await ListFinishedCompetitionsFirstWinner(GamingPlatform.Switch, "92075"); 437 | } 438 | } 439 | } 440 | -------------------------------------------------------------------------------- /Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/SampleApp1/ProgramVersion1.cs: -------------------------------------------------------------------------------- 1 | //namespace SampleApp1 2 | //{ 3 | // using Microsoft.Azure.Documents; 4 | // using Microsoft.Azure.Documents.Client; 5 | // using Microsoft.Azure.Documents.Linq; 6 | // using Microsoft.Extensions.Configuration; 7 | // using System; 8 | // using System.Linq; 9 | // using System.Threading.Tasks; 10 | 11 | // public class ProgramVersion1 12 | // { 13 | // private static string databaseId; 14 | // private static string collectionId; 15 | // private static DocumentClient client; 16 | 17 | // public static void Main(string[] args) 18 | // { 19 | // var configurationBuilder = new ConfigurationBuilder(); 20 | // configurationBuilder.AddJsonFile("configuration.json", optional: false, reloadOnChange: false); 21 | // var configuration = configurationBuilder.Build(); 22 | // string endpointUrl = configuration["CosmosDB:endpointUrl"]; 23 | // string authorizationKey = configuration["CosmosDB:authorizationKey"]; 24 | // databaseId = configuration["CosmosDB:databaseId"]; 25 | // collectionId = configuration["CosmosDB:collectionId"]; 26 | // try 27 | // { 28 | // using (client = new DocumentClient(new Uri(endpointUrl), authorizationKey)) 29 | // { 30 | // CreateAndQueryDynamicDocumentsAsync().Wait(); 31 | // } 32 | // } 33 | // catch (DocumentClientException dce) 34 | // { 35 | // var baseException = dce.GetBaseException(); 36 | // Console.WriteLine( 37 | // $"DocumentClientException occurred. Status code: {dce.StatusCode}; Message: {dce.Message}; Base exception message: {baseException.Message}"); 38 | // } 39 | // catch (Exception e) 40 | // { 41 | // var baseException = e.GetBaseException(); 42 | // Console.WriteLine( 43 | // $"Exception occurred. Message: {e.Message}; Base exception message: {baseException.Message}"); 44 | // } 45 | // finally 46 | // { 47 | // Console.WriteLine("Press any key to exit the console application."); 48 | // Console.ReadKey(); 49 | // } 50 | // } 51 | 52 | // private static async Task RetrieveOrCreateDatabaseAsync() 53 | // { 54 | // // Create a new document database if it doesn’t exist 55 | // var databaseResponse = await client.CreateDatabaseIfNotExistsAsync( 56 | // new Database 57 | // { 58 | // Id = databaseId, 59 | // }); 60 | // switch (databaseResponse.StatusCode) 61 | // { 62 | // case System.Net.HttpStatusCode.Created: 63 | // Console.WriteLine($"The database {databaseId} has been created."); 64 | // break; 65 | // case System.Net.HttpStatusCode.OK: 66 | // Console.WriteLine($"The database {databaseId} has been retrieved."); 67 | // break; 68 | // } 69 | // return databaseResponse.Resource; 70 | // } 71 | 72 | // private static async Task CreateCollectionIfNotExistsAsync() 73 | // { 74 | // var databaseUri = UriFactory.CreateDatabaseUri(databaseId); 75 | // DocumentCollection documentCollectionResource; 76 | // var isCollectionCreated = await client.CreateDocumentCollectionQuery(databaseUri) 77 | // .Where(c => c.Id == collectionId) 78 | // .CountAsync() == 1; 79 | // if (isCollectionCreated) 80 | // { 81 | // Console.WriteLine($"The collection {collectionId} already exists."); 82 | // var documentCollectionUri = UriFactory.CreateDocumentCollectionUri(databaseId, collectionId); 83 | // var documentCollectionResponse = await client.ReadDocumentCollectionAsync(documentCollectionUri); 84 | // documentCollectionResource = documentCollectionResponse.Resource; 85 | // } 86 | // else 87 | // { 88 | // var documentCollection = new DocumentCollection 89 | // { 90 | // Id = collectionId, 91 | // }; 92 | // documentCollection.PartitionKey.Paths.Add("/location/zipCode"); 93 | // var uniqueKey = new UniqueKey(); 94 | // uniqueKey.Paths.Add("/title"); 95 | // documentCollection.UniqueKeyPolicy.UniqueKeys.Add(uniqueKey); 96 | // var requestOptions = new RequestOptions 97 | // { 98 | // OfferThroughput = 1000, 99 | // }; 100 | // var collectionResponse = await client.CreateDocumentCollectionAsync( 101 | // databaseUri, 102 | // documentCollection, 103 | // requestOptions); 104 | // if (collectionResponse.StatusCode == System.Net.HttpStatusCode.Created) 105 | // { 106 | // Console.WriteLine($"The collection {collectionId} has been created."); 107 | // } 108 | // documentCollectionResource = collectionResponse.Resource; 109 | // } 110 | 111 | // return documentCollectionResource; 112 | // } 113 | 114 | // private static async Task GetCompetitionByTitle(string title) 115 | // { 116 | // // Build a query to retrieve a document with a specific title 117 | // var collectionUri = UriFactory.CreateDocumentCollectionUri(databaseId, collectionId); 118 | // var documentQuery = client.CreateDocumentQuery(collectionUri, 119 | // $"SELECT * FROM Competitions c WHERE c.title = '{title}'", 120 | // new FeedOptions() 121 | // { 122 | // EnableCrossPartitionQuery = true, 123 | // MaxItemCount = 1, 124 | // }) 125 | // .AsDocumentQuery(); 126 | // while (documentQuery.HasMoreResults) 127 | // { 128 | // foreach (var competition in await documentQuery.ExecuteNextAsync()) 129 | // { 130 | // Console.WriteLine( 131 | // $"The document with the following title exists: {title}"); 132 | // Console.WriteLine(competition); 133 | // return competition; 134 | // } 135 | // } 136 | 137 | // // No matching document found 138 | // return null; 139 | // } 140 | 141 | // private static async Task InsertCompetition1(string competitionId, 142 | // string competitionTitle, 143 | // string competitionLocationZipCode) 144 | // { 145 | // // Insert a document related to a competition that has finished and has winners 146 | // var collectionUri = UriFactory.CreateDocumentCollectionUri(databaseId, collectionId); 147 | // var documentResponse = await client.CreateDocumentAsync(collectionUri, new 148 | // { 149 | // id = competitionId, 150 | // title = competitionTitle, 151 | // location = new 152 | // { 153 | // zipCode = competitionLocationZipCode, 154 | // state = "CA", 155 | // }, 156 | // platforms = new[] 157 | // { 158 | // "PS4", "XBox", "Switch" 159 | // }, 160 | // games = new[] 161 | // { 162 | // "Fortnite", "NBA Live 19" 163 | // }, 164 | // numberOfRegisteredCompetitors = 80, 165 | // numberOfCompetitors = 60, 166 | // numberOfViewers = 300, 167 | // status = "Finished", 168 | // dateTime = DateTime.UtcNow.AddDays(-50), 169 | // winners = new[] 170 | // { 171 | // new 172 | // { 173 | // player = new 174 | // { 175 | // nickName = "EnzoTheGreatest", 176 | // country = "Italy", 177 | // city = "Rome" 178 | // }, 179 | // position = 1, 180 | // score = 7500, 181 | // prize = 1500, 182 | // }, 183 | // new 184 | // { 185 | // player = new 186 | // { 187 | // nickName = "NicoInGamerLand", 188 | // country = "Argentina", 189 | // city = "Buenos Aires" 190 | // }, 191 | // position = 2, 192 | // score = 6500, 193 | // prize = 750, 194 | // }, 195 | // new 196 | // { 197 | // player = new 198 | // { 199 | // nickName = "KiwiBoy", 200 | // country = "New Zealand", 201 | // city = "Auckland" 202 | // }, 203 | // position = 3, 204 | // score = 3500, 205 | // prize = 250, 206 | // } 207 | // }, 208 | // }); 209 | 210 | // if (documentResponse.StatusCode == System.Net.HttpStatusCode.Created) 211 | // { 212 | // Console.WriteLine($"The competition with the title {competitionTitle} has been created."); 213 | // } 214 | 215 | // return documentResponse.Resource; 216 | // } 217 | 218 | // private static async Task UpdateScheduledCompetition(string competitionId, 219 | // string competitionLocationZipCode, 220 | // DateTime newDateTime, 221 | // int newNumberOfRegisteredCompetitors) 222 | // { 223 | // // Retrieve a document related to a competition that is scheduled 224 | // // and update its date and its number of registered competitors 225 | // // The read operation requires the partition key 226 | // var documentToUpdateUri = UriFactory.CreateDocumentUri(databaseId, collectionId, competitionId); 227 | // var readDocumentResponse = await client.ReadDocumentAsync(documentToUpdateUri, new RequestOptions() 228 | // { 229 | // PartitionKey = new PartitionKey(competitionLocationZipCode) 230 | // }); 231 | // ((dynamic)readDocumentResponse.Resource).dateTime = newDateTime; 232 | // ((dynamic)readDocumentResponse.Resource).numberOfRegisteredCompetitors = newNumberOfRegisteredCompetitors; 233 | // ResourceResponse updatedDocumentResponse = await client.ReplaceDocumentAsync( 234 | // documentToUpdateUri, 235 | // readDocumentResponse.Resource); 236 | 237 | // if (updatedDocumentResponse.StatusCode == System.Net.HttpStatusCode.OK) 238 | // { 239 | // Console.WriteLine($"The competition with id {competitionId} has been updated."); 240 | // } 241 | 242 | // return updatedDocumentResponse.Resource; 243 | // } 244 | 245 | // private static async Task InsertCompetition2(string competitionId, 246 | // string competitionTitle, 247 | // string competitionLocationZipCode) 248 | // { 249 | // // Insert a document related to a competition that is scheduled 250 | // // and doesn’t have winners yet 251 | // var collectionUri = UriFactory.CreateDocumentCollectionUri(databaseId, collectionId); 252 | // var documentResponse = await client.CreateDocumentAsync(collectionUri, new 253 | // { 254 | // id = competitionId, 255 | // title = competitionTitle, 256 | // location = new 257 | // { 258 | // zipCode = competitionLocationZipCode, 259 | // state = "CA", 260 | // }, 261 | // platforms = new[] 262 | // { 263 | // "PC", "PS4", "XBox" 264 | // }, 265 | // games = new[] 266 | // { 267 | // "Madden NFL 19", "Fortnite" 268 | // }, 269 | // numberOfRegisteredCompetitors = 160, 270 | // status = "Scheduled", 271 | // dateTime = DateTime.UtcNow.AddDays(50), 272 | // }); 273 | 274 | // if (documentResponse.StatusCode == System.Net.HttpStatusCode.Created) 275 | // { 276 | // Console.WriteLine($"The competition with the title {competitionTitle} has been created."); 277 | // } 278 | 279 | // return documentResponse.Resource; 280 | // } 281 | 282 | // private static async Task DoesCompetitionWithTitleExist(string competitionTitle) 283 | // { 284 | // bool exists = false; 285 | // // Retrieve the number of documents with a specific title 286 | // // Very important: Cross partition queries only support 'VALUE ' for aggregates 287 | // var collectionUri = UriFactory.CreateDocumentCollectionUri(databaseId, collectionId); 288 | // var documentCountQuery = client.CreateDocumentQuery(collectionUri, 289 | // $"SELECT VALUE COUNT(1) FROM Competitions c WHERE c.title = '{competitionTitle}'", 290 | // new FeedOptions() 291 | // { 292 | // EnableCrossPartitionQuery = true, 293 | // MaxItemCount = 1, 294 | // }) 295 | // .AsDocumentQuery(); 296 | // while (documentCountQuery.HasMoreResults) 297 | // { 298 | // var documentCountQueryResult = await documentCountQuery.ExecuteNextAsync(); 299 | // exists = (documentCountQueryResult.FirstOrDefault() == 1); 300 | // } 301 | 302 | // return exists; 303 | // } 304 | 305 | // private static async Task ListScheduledCompetitions() 306 | // { 307 | // // Retrieve the titles for all the scheduled competitions that have more than 200 registered competitors 308 | // var collectionUri = UriFactory.CreateDocumentCollectionUri(databaseId, collectionId); 309 | // var selectTitleQuery = client.CreateDocumentQuery(collectionUri, 310 | // $"SELECT VALUE c.title FROM Competitions c WHERE c.numberOfRegisteredCompetitors > 200 AND c.status = 'Scheduled'", 311 | // new FeedOptions() 312 | // { 313 | // EnableCrossPartitionQuery = true, 314 | // MaxItemCount = 100, 315 | // }) 316 | // .AsDocumentQuery(); 317 | // while (selectTitleQuery.HasMoreResults) 318 | // { 319 | // var selectTitleQueryResult = await selectTitleQuery.ExecuteNextAsync(); 320 | // foreach (var title in selectTitleQueryResult) 321 | // { 322 | // Console.WriteLine(title); 323 | // } 324 | // } 325 | // } 326 | 327 | // private static async Task CreateAndQueryDynamicDocumentsAsync() 328 | // { 329 | // var database = await RetrieveOrCreateDatabaseAsync(); 330 | // Console.WriteLine( 331 | // $"The database {databaseId} is available for operations with the following AltLink: {database.AltLink}"); 332 | // var collection = await CreateCollectionIfNotExistsAsync(); 333 | // Console.WriteLine( 334 | // $"The collection {collectionId} is available for operations with the following AltLink: {collection.AltLink}"); 335 | // string competition1Id = "1"; 336 | // string competition1Title = "Crowns for Gamers - Portland 2018"; 337 | // string competition1ZipCode = "90210"; 338 | // var competition1 = await GetCompetitionByTitle(competition1Title); 339 | // if (competition1 == null) 340 | // { 341 | // competition1 = await InsertCompetition1(competition1Id, competition1Title, competition1ZipCode); 342 | // } 343 | 344 | // string competition2Title = "Defenders of the crown - San Diego 2018"; 345 | // bool isCompetition2Inserted = await DoesCompetitionWithTitleExist(competition2Title); 346 | // string competition2Id = "2"; 347 | // string competition2LocationZipCode = "92075"; 348 | // if (isCompetition2Inserted) 349 | // { 350 | // Console.WriteLine( 351 | // $"The document with the following title exists: {competition2Title}"); 352 | // } 353 | // else 354 | // { 355 | // var competition2 = await InsertCompetition2(competition2Id, competition2Title, competition2LocationZipCode); 356 | // } 357 | 358 | // var updatedCompetition2 = await UpdateScheduledCompetition(competition2Id, 359 | // competition2LocationZipCode, 360 | // DateTime.UtcNow.AddDays(60), 361 | // 250); 362 | 363 | // await ListScheduledCompetitions(); 364 | // } 365 | // } 366 | //} 367 | -------------------------------------------------------------------------------- /Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/SampleApp1/SampleApp1.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | PreserveNewest 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/SampleApp1/Types/CompetitionStatus.cs: -------------------------------------------------------------------------------- 1 | namespace SampleApp1.Types 2 | { 3 | public enum CompetitionStatus 4 | { 5 | // The competition is scheduled and didn't happen yet 6 | Scheduled, 7 | // The competition is finished and has winners 8 | Finished, 9 | // The competition has been canceled 10 | Canceled 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/SampleApp1/Types/GamingPlatform.cs: -------------------------------------------------------------------------------- 1 | namespace SampleApp1.Types 2 | { 3 | using Newtonsoft.Json; 4 | using Newtonsoft.Json.Converters; 5 | 6 | [JsonConverter(typeof(StringEnumConverter))] 7 | public enum GamingPlatform 8 | { 9 | Switch, 10 | PC, 11 | PS4, 12 | XBox, 13 | iOS, 14 | Android 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/SampleApp1/bin/Debug/netcoreapp2.0/DocumentDB.Spatial.Sql.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Guide-to-NoSQL-with-Azure-Cosmos-DB/562c99197eb17b61be4f110966dc3b3984fad1f6/Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/SampleApp1/bin/Debug/netcoreapp2.0/DocumentDB.Spatial.Sql.dll -------------------------------------------------------------------------------- /Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/SampleApp1/bin/Debug/netcoreapp2.0/Microsoft.Azure.Documents.ServiceInterop.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Guide-to-NoSQL-with-Azure-Cosmos-DB/562c99197eb17b61be4f110966dc3b3984fad1f6/Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/SampleApp1/bin/Debug/netcoreapp2.0/Microsoft.Azure.Documents.ServiceInterop.dll -------------------------------------------------------------------------------- /Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/SampleApp1/bin/Debug/netcoreapp2.0/SampleApp1.deps.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeTarget": { 3 | "name": ".NETCoreApp,Version=v2.0", 4 | "signature": "423af6a377c2ada6f6deeb571b3b115c8ac597e4" 5 | }, 6 | "compilationOptions": {}, 7 | "targets": { 8 | ".NETCoreApp,Version=v2.0": { 9 | "SampleApp1/1.0.0": { 10 | "dependencies": { 11 | "Microsoft.Azure.DocumentDB.Core": "2.0.0", 12 | "Microsoft.Extensions.Configuration": "2.1.1", 13 | "Microsoft.Extensions.Configuration.Json": "2.1.1" 14 | }, 15 | "runtime": { 16 | "SampleApp1.dll": {} 17 | } 18 | }, 19 | "Microsoft.Azure.DocumentDB.Core/2.0.0": { 20 | "dependencies": { 21 | "Newtonsoft.Json": "11.0.2", 22 | "System.Collections.NonGeneric": "4.0.1", 23 | "System.Collections.Specialized": "4.0.1", 24 | "System.Diagnostics.TraceSource": "4.0.0", 25 | "System.Dynamic.Runtime": "4.0.11", 26 | "System.Linq.Queryable": "4.0.1", 27 | "System.Net.NameResolution": "4.0.0", 28 | "System.Net.NetworkInformation": "4.1.0", 29 | "System.Net.Requests": "4.0.11", 30 | "System.Net.Security": "4.0.0", 31 | "System.Net.WebHeaderCollection": "4.0.1", 32 | "System.Runtime.Serialization.Primitives": "4.1.1", 33 | "System.Security.SecureString": "4.0.0" 34 | }, 35 | "runtime": { 36 | "lib/netstandard1.6/Microsoft.Azure.DocumentDB.Core.dll": {} 37 | }, 38 | "runtimeTargets": { 39 | "runtimes/win7-x64/native/DocumentDB.Spatial.Sql.dll": { 40 | "rid": "win7-x64", 41 | "assetType": "native" 42 | }, 43 | "runtimes/win7-x64/native/Microsoft.Azure.Documents.ServiceInterop.dll": { 44 | "rid": "win7-x64", 45 | "assetType": "native" 46 | } 47 | } 48 | }, 49 | "Microsoft.Extensions.Configuration/2.1.1": { 50 | "dependencies": { 51 | "Microsoft.Extensions.Configuration.Abstractions": "2.1.1" 52 | }, 53 | "runtime": { 54 | "lib/netstandard2.0/Microsoft.Extensions.Configuration.dll": {} 55 | } 56 | }, 57 | "Microsoft.Extensions.Configuration.Abstractions/2.1.1": { 58 | "dependencies": { 59 | "Microsoft.Extensions.Primitives": "2.1.1" 60 | }, 61 | "runtime": { 62 | "lib/netstandard2.0/Microsoft.Extensions.Configuration.Abstractions.dll": {} 63 | } 64 | }, 65 | "Microsoft.Extensions.Configuration.FileExtensions/2.1.1": { 66 | "dependencies": { 67 | "Microsoft.Extensions.Configuration": "2.1.1", 68 | "Microsoft.Extensions.FileProviders.Physical": "2.1.1" 69 | }, 70 | "runtime": { 71 | "lib/netstandard2.0/Microsoft.Extensions.Configuration.FileExtensions.dll": {} 72 | } 73 | }, 74 | "Microsoft.Extensions.Configuration.Json/2.1.1": { 75 | "dependencies": { 76 | "Microsoft.Extensions.Configuration": "2.1.1", 77 | "Microsoft.Extensions.Configuration.FileExtensions": "2.1.1", 78 | "Newtonsoft.Json": "11.0.2" 79 | }, 80 | "runtime": { 81 | "lib/netstandard2.0/Microsoft.Extensions.Configuration.Json.dll": {} 82 | } 83 | }, 84 | "Microsoft.Extensions.FileProviders.Abstractions/2.1.1": { 85 | "dependencies": { 86 | "Microsoft.Extensions.Primitives": "2.1.1" 87 | }, 88 | "runtime": { 89 | "lib/netstandard2.0/Microsoft.Extensions.FileProviders.Abstractions.dll": {} 90 | } 91 | }, 92 | "Microsoft.Extensions.FileProviders.Physical/2.1.1": { 93 | "dependencies": { 94 | "Microsoft.Extensions.FileProviders.Abstractions": "2.1.1", 95 | "Microsoft.Extensions.FileSystemGlobbing": "2.1.1" 96 | }, 97 | "runtime": { 98 | "lib/netstandard2.0/Microsoft.Extensions.FileProviders.Physical.dll": {} 99 | } 100 | }, 101 | "Microsoft.Extensions.FileSystemGlobbing/2.1.1": { 102 | "runtime": { 103 | "lib/netstandard2.0/Microsoft.Extensions.FileSystemGlobbing.dll": {} 104 | } 105 | }, 106 | "Microsoft.Extensions.Primitives/2.1.1": { 107 | "dependencies": { 108 | "System.Memory": "4.5.1", 109 | "System.Runtime.CompilerServices.Unsafe": "4.5.1" 110 | }, 111 | "runtime": { 112 | "lib/netstandard2.0/Microsoft.Extensions.Primitives.dll": {} 113 | } 114 | }, 115 | "Microsoft.NETCore.Targets/1.0.1": {}, 116 | "Microsoft.Win32.Primitives/4.0.1": { 117 | "dependencies": { 118 | "Microsoft.NETCore.Targets": "1.0.1", 119 | "System.Runtime": "4.1.0" 120 | } 121 | }, 122 | "Newtonsoft.Json/11.0.2": { 123 | "runtime": { 124 | "lib/netstandard2.0/Newtonsoft.Json.dll": {} 125 | } 126 | }, 127 | "runtime.native.System/4.0.0": { 128 | "dependencies": { 129 | "Microsoft.NETCore.Targets": "1.0.1" 130 | } 131 | }, 132 | "runtime.native.System.Net.Http/4.0.1": { 133 | "dependencies": { 134 | "Microsoft.NETCore.Targets": "1.0.1" 135 | } 136 | }, 137 | "runtime.native.System.Net.Security/4.0.1": { 138 | "dependencies": { 139 | "Microsoft.NETCore.Targets": "1.0.1" 140 | } 141 | }, 142 | "runtime.native.System.Security.Cryptography/4.0.0": { 143 | "dependencies": { 144 | "Microsoft.NETCore.Targets": "1.0.1" 145 | } 146 | }, 147 | "System.Collections/4.0.11": { 148 | "dependencies": { 149 | "Microsoft.NETCore.Targets": "1.0.1", 150 | "System.Runtime": "4.1.0" 151 | } 152 | }, 153 | "System.Collections.Concurrent/4.0.12": { 154 | "dependencies": { 155 | "System.Collections": "4.0.11", 156 | "System.Diagnostics.Debug": "4.0.11", 157 | "System.Diagnostics.Tracing": "4.1.0", 158 | "System.Globalization": "4.0.11", 159 | "System.Reflection": "4.1.0", 160 | "System.Resources.ResourceManager": "4.0.1", 161 | "System.Runtime": "4.1.0", 162 | "System.Runtime.Extensions": "4.1.0", 163 | "System.Threading": "4.0.11", 164 | "System.Threading.Tasks": "4.0.11" 165 | } 166 | }, 167 | "System.Collections.NonGeneric/4.0.1": { 168 | "dependencies": { 169 | "System.Diagnostics.Debug": "4.0.11", 170 | "System.Globalization": "4.0.11", 171 | "System.Resources.ResourceManager": "4.0.1", 172 | "System.Runtime": "4.1.0", 173 | "System.Runtime.Extensions": "4.1.0", 174 | "System.Threading": "4.0.11" 175 | } 176 | }, 177 | "System.Collections.Specialized/4.0.1": { 178 | "dependencies": { 179 | "System.Collections.NonGeneric": "4.0.1", 180 | "System.Globalization": "4.0.11", 181 | "System.Globalization.Extensions": "4.0.1", 182 | "System.Resources.ResourceManager": "4.0.1", 183 | "System.Runtime": "4.1.0", 184 | "System.Runtime.Extensions": "4.1.0", 185 | "System.Threading": "4.0.11" 186 | } 187 | }, 188 | "System.Diagnostics.Debug/4.0.11": { 189 | "dependencies": { 190 | "Microsoft.NETCore.Targets": "1.0.1", 191 | "System.Runtime": "4.1.0" 192 | } 193 | }, 194 | "System.Diagnostics.DiagnosticSource/4.0.0": { 195 | "dependencies": { 196 | "System.Collections": "4.0.11", 197 | "System.Diagnostics.Tracing": "4.1.0", 198 | "System.Reflection": "4.1.0", 199 | "System.Runtime": "4.1.0", 200 | "System.Threading": "4.0.11" 201 | } 202 | }, 203 | "System.Diagnostics.TraceSource/4.0.0": { 204 | "dependencies": { 205 | "System.Collections": "4.0.11", 206 | "System.Diagnostics.Debug": "4.0.11", 207 | "System.Globalization": "4.0.11", 208 | "System.Resources.ResourceManager": "4.0.1", 209 | "System.Runtime": "4.1.0", 210 | "System.Runtime.Extensions": "4.1.0", 211 | "System.Threading": "4.0.11", 212 | "runtime.native.System": "4.0.0" 213 | }, 214 | "runtimeTargets": { 215 | "runtime/unix/lib/_._": { 216 | "rid": "unix", 217 | "assetType": "runtime" 218 | }, 219 | "runtime/win/lib/_._": { 220 | "rid": "win", 221 | "assetType": "runtime" 222 | } 223 | } 224 | }, 225 | "System.Diagnostics.Tracing/4.1.0": { 226 | "dependencies": { 227 | "Microsoft.NETCore.Targets": "1.0.1", 228 | "System.Runtime": "4.1.0" 229 | } 230 | }, 231 | "System.Dynamic.Runtime/4.0.11": { 232 | "dependencies": { 233 | "System.Collections": "4.0.11", 234 | "System.Diagnostics.Debug": "4.0.11", 235 | "System.Globalization": "4.0.11", 236 | "System.Linq": "4.1.0", 237 | "System.Linq.Expressions": "4.1.0", 238 | "System.ObjectModel": "4.0.12", 239 | "System.Reflection": "4.1.0", 240 | "System.Reflection.Emit": "4.0.1", 241 | "System.Reflection.Emit.ILGeneration": "4.0.1", 242 | "System.Reflection.Primitives": "4.0.1", 243 | "System.Reflection.TypeExtensions": "4.1.0", 244 | "System.Resources.ResourceManager": "4.0.1", 245 | "System.Runtime": "4.1.0", 246 | "System.Runtime.Extensions": "4.1.0", 247 | "System.Threading": "4.0.11" 248 | } 249 | }, 250 | "System.Globalization/4.0.11": { 251 | "dependencies": { 252 | "Microsoft.NETCore.Targets": "1.0.1", 253 | "System.Runtime": "4.1.0" 254 | } 255 | }, 256 | "System.Globalization.Calendars/4.0.1": { 257 | "dependencies": { 258 | "Microsoft.NETCore.Targets": "1.0.1", 259 | "System.Globalization": "4.0.11", 260 | "System.Runtime": "4.1.0" 261 | } 262 | }, 263 | "System.Globalization.Extensions/4.0.1": { 264 | "dependencies": { 265 | "System.Globalization": "4.0.11", 266 | "System.Resources.ResourceManager": "4.0.1", 267 | "System.Runtime": "4.1.0", 268 | "System.Runtime.Extensions": "4.1.0", 269 | "System.Runtime.InteropServices": "4.1.0" 270 | }, 271 | "runtimeTargets": { 272 | "runtime/unix/lib/_._": { 273 | "rid": "unix", 274 | "assetType": "runtime" 275 | }, 276 | "runtime/win/lib/_._": { 277 | "rid": "win", 278 | "assetType": "runtime" 279 | } 280 | } 281 | }, 282 | "System.IO/4.1.0": { 283 | "dependencies": { 284 | "Microsoft.NETCore.Targets": "1.0.1", 285 | "System.Runtime": "4.1.0", 286 | "System.Text.Encoding": "4.0.11", 287 | "System.Threading.Tasks": "4.0.11" 288 | } 289 | }, 290 | "System.IO.FileSystem/4.0.1": { 291 | "dependencies": { 292 | "Microsoft.NETCore.Targets": "1.0.1", 293 | "System.IO": "4.1.0", 294 | "System.IO.FileSystem.Primitives": "4.0.1", 295 | "System.Runtime": "4.1.0", 296 | "System.Runtime.Handles": "4.0.1", 297 | "System.Text.Encoding": "4.0.11", 298 | "System.Threading.Tasks": "4.0.11" 299 | } 300 | }, 301 | "System.IO.FileSystem.Primitives/4.0.1": { 302 | "dependencies": { 303 | "System.Runtime": "4.1.0" 304 | } 305 | }, 306 | "System.Linq/4.1.0": { 307 | "dependencies": { 308 | "System.Collections": "4.0.11", 309 | "System.Diagnostics.Debug": "4.0.11", 310 | "System.Resources.ResourceManager": "4.0.1", 311 | "System.Runtime": "4.1.0", 312 | "System.Runtime.Extensions": "4.1.0" 313 | } 314 | }, 315 | "System.Linq.Expressions/4.1.0": { 316 | "dependencies": { 317 | "System.Collections": "4.0.11", 318 | "System.Diagnostics.Debug": "4.0.11", 319 | "System.Globalization": "4.0.11", 320 | "System.IO": "4.1.0", 321 | "System.Linq": "4.1.0", 322 | "System.ObjectModel": "4.0.12", 323 | "System.Reflection": "4.1.0", 324 | "System.Reflection.Emit": "4.0.1", 325 | "System.Reflection.Emit.ILGeneration": "4.0.1", 326 | "System.Reflection.Emit.Lightweight": "4.0.1", 327 | "System.Reflection.Extensions": "4.0.1", 328 | "System.Reflection.Primitives": "4.0.1", 329 | "System.Reflection.TypeExtensions": "4.1.0", 330 | "System.Resources.ResourceManager": "4.0.1", 331 | "System.Runtime": "4.1.0", 332 | "System.Runtime.Extensions": "4.1.0", 333 | "System.Threading": "4.0.11" 334 | } 335 | }, 336 | "System.Linq.Queryable/4.0.1": { 337 | "dependencies": { 338 | "System.Collections": "4.0.11", 339 | "System.Diagnostics.Debug": "4.0.11", 340 | "System.Linq": "4.1.0", 341 | "System.Linq.Expressions": "4.1.0", 342 | "System.Reflection": "4.1.0", 343 | "System.Reflection.Extensions": "4.0.1", 344 | "System.Resources.ResourceManager": "4.0.1", 345 | "System.Runtime": "4.1.0" 346 | } 347 | }, 348 | "System.Memory/4.5.1": { 349 | "dependencies": { 350 | "System.Runtime.CompilerServices.Unsafe": "4.5.1" 351 | }, 352 | "runtime": { 353 | "lib/netstandard2.0/System.Memory.dll": {} 354 | } 355 | }, 356 | "System.Net.Http/4.1.0": { 357 | "dependencies": { 358 | "System.Collections": "4.0.11", 359 | "System.Diagnostics.Debug": "4.0.11", 360 | "System.Diagnostics.DiagnosticSource": "4.0.0", 361 | "System.Diagnostics.Tracing": "4.1.0", 362 | "System.Globalization": "4.0.11", 363 | "System.Globalization.Extensions": "4.0.1", 364 | "System.IO": "4.1.0", 365 | "System.IO.FileSystem": "4.0.1", 366 | "System.Net.Primitives": "4.0.11", 367 | "System.Resources.ResourceManager": "4.0.1", 368 | "System.Runtime": "4.1.0", 369 | "System.Runtime.Extensions": "4.1.0", 370 | "System.Runtime.Handles": "4.0.1", 371 | "System.Runtime.InteropServices": "4.1.0", 372 | "System.Security.Cryptography.Algorithms": "4.2.0", 373 | "System.Security.Cryptography.Encoding": "4.0.0", 374 | "System.Security.Cryptography.OpenSsl": "4.0.0", 375 | "System.Security.Cryptography.Primitives": "4.0.0", 376 | "System.Security.Cryptography.X509Certificates": "4.1.0", 377 | "System.Text.Encoding": "4.0.11", 378 | "System.Threading": "4.0.11", 379 | "System.Threading.Tasks": "4.0.11", 380 | "runtime.native.System": "4.0.0", 381 | "runtime.native.System.Net.Http": "4.0.1", 382 | "runtime.native.System.Security.Cryptography": "4.0.0" 383 | }, 384 | "runtimeTargets": { 385 | "runtime/unix/lib/_._": { 386 | "rid": "unix", 387 | "assetType": "runtime" 388 | }, 389 | "runtime/win/lib/_._": { 390 | "rid": "win", 391 | "assetType": "runtime" 392 | } 393 | } 394 | }, 395 | "System.Net.NameResolution/4.0.0": { 396 | "dependencies": { 397 | "System.Collections": "4.0.11", 398 | "System.Diagnostics.Tracing": "4.1.0", 399 | "System.Globalization": "4.0.11", 400 | "System.Net.Primitives": "4.0.11", 401 | "System.Resources.ResourceManager": "4.0.1", 402 | "System.Runtime": "4.1.0", 403 | "System.Runtime.Extensions": "4.1.0", 404 | "System.Runtime.Handles": "4.0.1", 405 | "System.Runtime.InteropServices": "4.1.0", 406 | "System.Security.Principal.Windows": "4.0.0", 407 | "System.Threading": "4.0.11", 408 | "System.Threading.Tasks": "4.0.11", 409 | "runtime.native.System": "4.0.0" 410 | }, 411 | "runtimeTargets": { 412 | "runtime/unix/lib/_._": { 413 | "rid": "unix", 414 | "assetType": "runtime" 415 | }, 416 | "runtime/win/lib/_._": { 417 | "rid": "win", 418 | "assetType": "runtime" 419 | } 420 | } 421 | }, 422 | "System.Net.NetworkInformation/4.1.0": { 423 | "dependencies": { 424 | "Microsoft.Win32.Primitives": "4.0.1", 425 | "System.Collections": "4.0.11", 426 | "System.Diagnostics.Tracing": "4.1.0", 427 | "System.Globalization": "4.0.11", 428 | "System.IO": "4.1.0", 429 | "System.IO.FileSystem": "4.0.1", 430 | "System.IO.FileSystem.Primitives": "4.0.1", 431 | "System.Linq": "4.1.0", 432 | "System.Net.Primitives": "4.0.11", 433 | "System.Net.Sockets": "4.1.0", 434 | "System.Resources.ResourceManager": "4.0.1", 435 | "System.Runtime": "4.1.0", 436 | "System.Runtime.Extensions": "4.1.0", 437 | "System.Runtime.Handles": "4.0.1", 438 | "System.Runtime.InteropServices": "4.1.0", 439 | "System.Security.Principal.Windows": "4.0.0", 440 | "System.Threading": "4.0.11", 441 | "System.Threading.Overlapped": "4.0.1", 442 | "System.Threading.Tasks": "4.0.11", 443 | "System.Threading.Thread": "4.0.0", 444 | "System.Threading.ThreadPool": "4.0.10", 445 | "runtime.native.System": "4.0.0" 446 | }, 447 | "runtimeTargets": { 448 | "runtime/linux/lib/_._": { 449 | "rid": "linux", 450 | "assetType": "runtime" 451 | }, 452 | "runtime/osx/lib/_._": { 453 | "rid": "osx", 454 | "assetType": "runtime" 455 | }, 456 | "runtime/win/lib/_._": { 457 | "rid": "win", 458 | "assetType": "runtime" 459 | } 460 | } 461 | }, 462 | "System.Net.Primitives/4.0.11": { 463 | "dependencies": { 464 | "Microsoft.NETCore.Targets": "1.0.1", 465 | "System.Runtime": "4.1.0", 466 | "System.Runtime.Handles": "4.0.1" 467 | } 468 | }, 469 | "System.Net.Requests/4.0.11": { 470 | "dependencies": { 471 | "System.Collections": "4.0.11", 472 | "System.Diagnostics.Debug": "4.0.11", 473 | "System.Diagnostics.Tracing": "4.1.0", 474 | "System.Globalization": "4.0.11", 475 | "System.IO": "4.1.0", 476 | "System.Net.Http": "4.1.0", 477 | "System.Net.Primitives": "4.0.11", 478 | "System.Net.WebHeaderCollection": "4.0.1", 479 | "System.Resources.ResourceManager": "4.0.1", 480 | "System.Runtime": "4.1.0", 481 | "System.Threading": "4.0.11", 482 | "System.Threading.Tasks": "4.0.11" 483 | }, 484 | "runtimeTargets": { 485 | "runtime/unix/lib/_._": { 486 | "rid": "unix", 487 | "assetType": "runtime" 488 | }, 489 | "runtime/win/lib/_._": { 490 | "rid": "win", 491 | "assetType": "runtime" 492 | } 493 | } 494 | }, 495 | "System.Net.Security/4.0.0": { 496 | "dependencies": { 497 | "Microsoft.Win32.Primitives": "4.0.1", 498 | "System.Collections": "4.0.11", 499 | "System.Collections.Concurrent": "4.0.12", 500 | "System.Diagnostics.Tracing": "4.1.0", 501 | "System.Globalization": "4.0.11", 502 | "System.Globalization.Extensions": "4.0.1", 503 | "System.IO": "4.1.0", 504 | "System.Net.Primitives": "4.0.11", 505 | "System.Resources.ResourceManager": "4.0.1", 506 | "System.Runtime": "4.1.0", 507 | "System.Runtime.Extensions": "4.1.0", 508 | "System.Runtime.Handles": "4.0.1", 509 | "System.Runtime.InteropServices": "4.1.0", 510 | "System.Security.Claims": "4.0.1", 511 | "System.Security.Cryptography.Algorithms": "4.2.0", 512 | "System.Security.Cryptography.Encoding": "4.0.0", 513 | "System.Security.Cryptography.OpenSsl": "4.0.0", 514 | "System.Security.Cryptography.Primitives": "4.0.0", 515 | "System.Security.Cryptography.X509Certificates": "4.1.0", 516 | "System.Security.Principal": "4.0.1", 517 | "System.Text.Encoding": "4.0.11", 518 | "System.Threading": "4.0.11", 519 | "System.Threading.Tasks": "4.0.11", 520 | "System.Threading.ThreadPool": "4.0.10", 521 | "runtime.native.System": "4.0.0", 522 | "runtime.native.System.Net.Security": "4.0.1", 523 | "runtime.native.System.Security.Cryptography": "4.0.0" 524 | }, 525 | "runtimeTargets": { 526 | "runtime/unix/lib/_._": { 527 | "rid": "unix", 528 | "assetType": "runtime" 529 | }, 530 | "runtime/win/lib/_._": { 531 | "rid": "win", 532 | "assetType": "runtime" 533 | } 534 | } 535 | }, 536 | "System.Net.Sockets/4.1.0": { 537 | "dependencies": { 538 | "Microsoft.NETCore.Targets": "1.0.1", 539 | "System.IO": "4.1.0", 540 | "System.Net.Primitives": "4.0.11", 541 | "System.Runtime": "4.1.0", 542 | "System.Threading.Tasks": "4.0.11" 543 | } 544 | }, 545 | "System.Net.WebHeaderCollection/4.0.1": { 546 | "dependencies": { 547 | "System.Collections": "4.0.11", 548 | "System.Resources.ResourceManager": "4.0.1", 549 | "System.Runtime": "4.1.0", 550 | "System.Runtime.Extensions": "4.1.0" 551 | } 552 | }, 553 | "System.ObjectModel/4.0.12": { 554 | "dependencies": { 555 | "System.Collections": "4.0.11", 556 | "System.Diagnostics.Debug": "4.0.11", 557 | "System.Resources.ResourceManager": "4.0.1", 558 | "System.Runtime": "4.1.0", 559 | "System.Threading": "4.0.11" 560 | } 561 | }, 562 | "System.Reflection/4.1.0": { 563 | "dependencies": { 564 | "Microsoft.NETCore.Targets": "1.0.1", 565 | "System.IO": "4.1.0", 566 | "System.Reflection.Primitives": "4.0.1", 567 | "System.Runtime": "4.1.0" 568 | } 569 | }, 570 | "System.Reflection.Emit/4.0.1": { 571 | "dependencies": { 572 | "System.IO": "4.1.0", 573 | "System.Reflection": "4.1.0", 574 | "System.Reflection.Emit.ILGeneration": "4.0.1", 575 | "System.Reflection.Primitives": "4.0.1", 576 | "System.Runtime": "4.1.0" 577 | } 578 | }, 579 | "System.Reflection.Emit.ILGeneration/4.0.1": { 580 | "dependencies": { 581 | "System.Reflection": "4.1.0", 582 | "System.Reflection.Primitives": "4.0.1", 583 | "System.Runtime": "4.1.0" 584 | } 585 | }, 586 | "System.Reflection.Emit.Lightweight/4.0.1": { 587 | "dependencies": { 588 | "System.Reflection": "4.1.0", 589 | "System.Reflection.Emit.ILGeneration": "4.0.1", 590 | "System.Reflection.Primitives": "4.0.1", 591 | "System.Runtime": "4.1.0" 592 | } 593 | }, 594 | "System.Reflection.Extensions/4.0.1": { 595 | "dependencies": { 596 | "Microsoft.NETCore.Targets": "1.0.1", 597 | "System.Reflection": "4.1.0", 598 | "System.Runtime": "4.1.0" 599 | } 600 | }, 601 | "System.Reflection.Primitives/4.0.1": { 602 | "dependencies": { 603 | "Microsoft.NETCore.Targets": "1.0.1", 604 | "System.Runtime": "4.1.0" 605 | } 606 | }, 607 | "System.Reflection.TypeExtensions/4.1.0": { 608 | "dependencies": { 609 | "System.Reflection": "4.1.0", 610 | "System.Runtime": "4.1.0" 611 | } 612 | }, 613 | "System.Resources.ResourceManager/4.0.1": { 614 | "dependencies": { 615 | "Microsoft.NETCore.Targets": "1.0.1", 616 | "System.Globalization": "4.0.11", 617 | "System.Reflection": "4.1.0", 618 | "System.Runtime": "4.1.0" 619 | } 620 | }, 621 | "System.Runtime/4.1.0": { 622 | "dependencies": { 623 | "Microsoft.NETCore.Targets": "1.0.1" 624 | } 625 | }, 626 | "System.Runtime.CompilerServices.Unsafe/4.5.1": { 627 | "runtime": { 628 | "lib/netcoreapp2.0/System.Runtime.CompilerServices.Unsafe.dll": {} 629 | } 630 | }, 631 | "System.Runtime.Extensions/4.1.0": { 632 | "dependencies": { 633 | "Microsoft.NETCore.Targets": "1.0.1", 634 | "System.Runtime": "4.1.0" 635 | } 636 | }, 637 | "System.Runtime.Handles/4.0.1": { 638 | "dependencies": { 639 | "Microsoft.NETCore.Targets": "1.0.1", 640 | "System.Runtime": "4.1.0" 641 | } 642 | }, 643 | "System.Runtime.InteropServices/4.1.0": { 644 | "dependencies": { 645 | "Microsoft.NETCore.Targets": "1.0.1", 646 | "System.Reflection": "4.1.0", 647 | "System.Reflection.Primitives": "4.0.1", 648 | "System.Runtime": "4.1.0", 649 | "System.Runtime.Handles": "4.0.1" 650 | } 651 | }, 652 | "System.Runtime.Numerics/4.0.1": { 653 | "dependencies": { 654 | "System.Globalization": "4.0.11", 655 | "System.Resources.ResourceManager": "4.0.1", 656 | "System.Runtime": "4.1.0", 657 | "System.Runtime.Extensions": "4.1.0" 658 | } 659 | }, 660 | "System.Runtime.Serialization.Primitives/4.1.1": { 661 | "dependencies": { 662 | "System.Resources.ResourceManager": "4.0.1", 663 | "System.Runtime": "4.1.0" 664 | } 665 | }, 666 | "System.Security.Claims/4.0.1": { 667 | "dependencies": { 668 | "System.Collections": "4.0.11", 669 | "System.Globalization": "4.0.11", 670 | "System.IO": "4.1.0", 671 | "System.Resources.ResourceManager": "4.0.1", 672 | "System.Runtime": "4.1.0", 673 | "System.Runtime.Extensions": "4.1.0", 674 | "System.Security.Principal": "4.0.1" 675 | } 676 | }, 677 | "System.Security.Cryptography.Algorithms/4.2.0": { 678 | "dependencies": { 679 | "System.Collections": "4.0.11", 680 | "System.IO": "4.1.0", 681 | "System.Resources.ResourceManager": "4.0.1", 682 | "System.Runtime": "4.1.0", 683 | "System.Runtime.Extensions": "4.1.0", 684 | "System.Runtime.Handles": "4.0.1", 685 | "System.Runtime.InteropServices": "4.1.0", 686 | "System.Runtime.Numerics": "4.0.1", 687 | "System.Security.Cryptography.Encoding": "4.0.0", 688 | "System.Security.Cryptography.Primitives": "4.0.0", 689 | "System.Text.Encoding": "4.0.11", 690 | "runtime.native.System.Security.Cryptography": "4.0.0" 691 | }, 692 | "runtimeTargets": { 693 | "runtime/unix/lib/_._": { 694 | "rid": "unix", 695 | "assetType": "runtime" 696 | }, 697 | "runtime/win/lib/_._": { 698 | "rid": "win", 699 | "assetType": "runtime" 700 | } 701 | } 702 | }, 703 | "System.Security.Cryptography.Cng/4.2.0": { 704 | "dependencies": { 705 | "System.IO": "4.1.0", 706 | "System.Resources.ResourceManager": "4.0.1", 707 | "System.Runtime": "4.1.0", 708 | "System.Runtime.Extensions": "4.1.0", 709 | "System.Runtime.Handles": "4.0.1", 710 | "System.Runtime.InteropServices": "4.1.0", 711 | "System.Security.Cryptography.Algorithms": "4.2.0", 712 | "System.Security.Cryptography.Encoding": "4.0.0", 713 | "System.Security.Cryptography.Primitives": "4.0.0", 714 | "System.Text.Encoding": "4.0.11" 715 | }, 716 | "runtimeTargets": { 717 | "runtime/unix/lib/_._": { 718 | "rid": "unix", 719 | "assetType": "runtime" 720 | }, 721 | "runtime/win/lib/_._": { 722 | "rid": "win", 723 | "assetType": "runtime" 724 | } 725 | } 726 | }, 727 | "System.Security.Cryptography.Csp/4.0.0": { 728 | "dependencies": { 729 | "System.IO": "4.1.0", 730 | "System.Reflection": "4.1.0", 731 | "System.Resources.ResourceManager": "4.0.1", 732 | "System.Runtime": "4.1.0", 733 | "System.Runtime.Extensions": "4.1.0", 734 | "System.Runtime.Handles": "4.0.1", 735 | "System.Runtime.InteropServices": "4.1.0", 736 | "System.Security.Cryptography.Algorithms": "4.2.0", 737 | "System.Security.Cryptography.Encoding": "4.0.0", 738 | "System.Security.Cryptography.Primitives": "4.0.0", 739 | "System.Text.Encoding": "4.0.11", 740 | "System.Threading": "4.0.11" 741 | }, 742 | "runtimeTargets": { 743 | "runtime/unix/lib/_._": { 744 | "rid": "unix", 745 | "assetType": "runtime" 746 | }, 747 | "runtime/win/lib/_._": { 748 | "rid": "win", 749 | "assetType": "runtime" 750 | } 751 | } 752 | }, 753 | "System.Security.Cryptography.Encoding/4.0.0": { 754 | "dependencies": { 755 | "System.Collections": "4.0.11", 756 | "System.Collections.Concurrent": "4.0.12", 757 | "System.Linq": "4.1.0", 758 | "System.Resources.ResourceManager": "4.0.1", 759 | "System.Runtime": "4.1.0", 760 | "System.Runtime.Extensions": "4.1.0", 761 | "System.Runtime.Handles": "4.0.1", 762 | "System.Runtime.InteropServices": "4.1.0", 763 | "System.Security.Cryptography.Primitives": "4.0.0", 764 | "System.Text.Encoding": "4.0.11", 765 | "runtime.native.System.Security.Cryptography": "4.0.0" 766 | }, 767 | "runtimeTargets": { 768 | "runtime/unix/lib/_._": { 769 | "rid": "unix", 770 | "assetType": "runtime" 771 | }, 772 | "runtime/win/lib/_._": { 773 | "rid": "win", 774 | "assetType": "runtime" 775 | } 776 | } 777 | }, 778 | "System.Security.Cryptography.OpenSsl/4.0.0": { 779 | "dependencies": { 780 | "System.Collections": "4.0.11", 781 | "System.IO": "4.1.0", 782 | "System.Resources.ResourceManager": "4.0.1", 783 | "System.Runtime": "4.1.0", 784 | "System.Runtime.Extensions": "4.1.0", 785 | "System.Runtime.Handles": "4.0.1", 786 | "System.Runtime.InteropServices": "4.1.0", 787 | "System.Runtime.Numerics": "4.0.1", 788 | "System.Security.Cryptography.Algorithms": "4.2.0", 789 | "System.Security.Cryptography.Encoding": "4.0.0", 790 | "System.Security.Cryptography.Primitives": "4.0.0", 791 | "System.Text.Encoding": "4.0.11", 792 | "runtime.native.System.Security.Cryptography": "4.0.0" 793 | }, 794 | "runtimeTargets": { 795 | "runtime/unix/lib/_._": { 796 | "rid": "unix", 797 | "assetType": "runtime" 798 | } 799 | } 800 | }, 801 | "System.Security.Cryptography.Primitives/4.0.0": { 802 | "dependencies": { 803 | "System.Diagnostics.Debug": "4.0.11", 804 | "System.Globalization": "4.0.11", 805 | "System.IO": "4.1.0", 806 | "System.Resources.ResourceManager": "4.0.1", 807 | "System.Runtime": "4.1.0", 808 | "System.Threading": "4.0.11", 809 | "System.Threading.Tasks": "4.0.11" 810 | } 811 | }, 812 | "System.Security.Cryptography.X509Certificates/4.1.0": { 813 | "dependencies": { 814 | "System.Collections": "4.0.11", 815 | "System.Diagnostics.Debug": "4.0.11", 816 | "System.Globalization": "4.0.11", 817 | "System.Globalization.Calendars": "4.0.1", 818 | "System.IO": "4.1.0", 819 | "System.IO.FileSystem": "4.0.1", 820 | "System.IO.FileSystem.Primitives": "4.0.1", 821 | "System.Resources.ResourceManager": "4.0.1", 822 | "System.Runtime": "4.1.0", 823 | "System.Runtime.Extensions": "4.1.0", 824 | "System.Runtime.Handles": "4.0.1", 825 | "System.Runtime.InteropServices": "4.1.0", 826 | "System.Runtime.Numerics": "4.0.1", 827 | "System.Security.Cryptography.Algorithms": "4.2.0", 828 | "System.Security.Cryptography.Cng": "4.2.0", 829 | "System.Security.Cryptography.Csp": "4.0.0", 830 | "System.Security.Cryptography.Encoding": "4.0.0", 831 | "System.Security.Cryptography.OpenSsl": "4.0.0", 832 | "System.Security.Cryptography.Primitives": "4.0.0", 833 | "System.Text.Encoding": "4.0.11", 834 | "System.Threading": "4.0.11", 835 | "runtime.native.System": "4.0.0", 836 | "runtime.native.System.Net.Http": "4.0.1", 837 | "runtime.native.System.Security.Cryptography": "4.0.0" 838 | }, 839 | "runtimeTargets": { 840 | "runtime/unix/lib/_._": { 841 | "rid": "unix", 842 | "assetType": "runtime" 843 | }, 844 | "runtime/win/lib/_._": { 845 | "rid": "win", 846 | "assetType": "runtime" 847 | } 848 | } 849 | }, 850 | "System.Security.Principal/4.0.1": { 851 | "dependencies": { 852 | "System.Runtime": "4.1.0" 853 | } 854 | }, 855 | "System.Security.Principal.Windows/4.0.0": { 856 | "dependencies": { 857 | "Microsoft.Win32.Primitives": "4.0.1", 858 | "System.Collections": "4.0.11", 859 | "System.Diagnostics.Debug": "4.0.11", 860 | "System.Reflection": "4.1.0", 861 | "System.Resources.ResourceManager": "4.0.1", 862 | "System.Runtime": "4.1.0", 863 | "System.Runtime.Extensions": "4.1.0", 864 | "System.Runtime.Handles": "4.0.1", 865 | "System.Runtime.InteropServices": "4.1.0", 866 | "System.Security.Claims": "4.0.1", 867 | "System.Security.Principal": "4.0.1", 868 | "System.Text.Encoding": "4.0.11", 869 | "System.Threading": "4.0.11" 870 | }, 871 | "runtimeTargets": { 872 | "runtime/unix/lib/_._": { 873 | "rid": "unix", 874 | "assetType": "runtime" 875 | }, 876 | "runtime/win/lib/_._": { 877 | "rid": "win", 878 | "assetType": "runtime" 879 | } 880 | } 881 | }, 882 | "System.Security.SecureString/4.0.0": { 883 | "dependencies": { 884 | "System.Resources.ResourceManager": "4.0.1", 885 | "System.Runtime": "4.1.0", 886 | "System.Runtime.Handles": "4.0.1", 887 | "System.Runtime.InteropServices": "4.1.0", 888 | "System.Security.Cryptography.Primitives": "4.0.0", 889 | "System.Text.Encoding": "4.0.11", 890 | "System.Threading": "4.0.11" 891 | }, 892 | "runtimeTargets": { 893 | "runtime/unix/lib/_._": { 894 | "rid": "unix", 895 | "assetType": "runtime" 896 | }, 897 | "runtime/win/lib/_._": { 898 | "rid": "win", 899 | "assetType": "runtime" 900 | } 901 | } 902 | }, 903 | "System.Text.Encoding/4.0.11": { 904 | "dependencies": { 905 | "Microsoft.NETCore.Targets": "1.0.1", 906 | "System.Runtime": "4.1.0" 907 | } 908 | }, 909 | "System.Threading/4.0.11": { 910 | "dependencies": { 911 | "System.Runtime": "4.1.0", 912 | "System.Threading.Tasks": "4.0.11" 913 | } 914 | }, 915 | "System.Threading.Overlapped/4.0.1": { 916 | "dependencies": { 917 | "System.Resources.ResourceManager": "4.0.1", 918 | "System.Runtime": "4.1.0", 919 | "System.Runtime.Handles": "4.0.1" 920 | }, 921 | "runtimeTargets": { 922 | "runtime/unix/lib/_._": { 923 | "rid": "unix", 924 | "assetType": "runtime" 925 | }, 926 | "runtime/win/lib/_._": { 927 | "rid": "win", 928 | "assetType": "runtime" 929 | } 930 | } 931 | }, 932 | "System.Threading.Tasks/4.0.11": { 933 | "dependencies": { 934 | "Microsoft.NETCore.Targets": "1.0.1", 935 | "System.Runtime": "4.1.0" 936 | } 937 | }, 938 | "System.Threading.Thread/4.0.0": { 939 | "dependencies": { 940 | "System.Runtime": "4.1.0" 941 | } 942 | }, 943 | "System.Threading.ThreadPool/4.0.10": { 944 | "dependencies": { 945 | "System.Runtime": "4.1.0", 946 | "System.Runtime.Handles": "4.0.1" 947 | } 948 | } 949 | } 950 | }, 951 | "libraries": { 952 | "SampleApp1/1.0.0": { 953 | "type": "project", 954 | "serviceable": false, 955 | "sha512": "" 956 | }, 957 | "Microsoft.Azure.DocumentDB.Core/2.0.0": { 958 | "type": "package", 959 | "serviceable": true, 960 | "sha512": "sha512-ZSPVN4dPylzwL+VKHAcmgTBDTMK27enilQmqAX7h5lZjJ54qEbuLzzfjkP1d8y5rRikw2hX8b9Fyt6AhbdtBnw==", 961 | "path": "microsoft.azure.documentdb.core/2.0.0", 962 | "hashPath": "microsoft.azure.documentdb.core.2.0.0.nupkg.sha512" 963 | }, 964 | "Microsoft.Extensions.Configuration/2.1.1": { 965 | "type": "package", 966 | "serviceable": true, 967 | "sha512": "sha512-1JaydycXzbfAExlsD7XIWykzVnU/wZM86KzrHyGlXuxqnqzcWSXLJn4Ejn8bDnq07CEJNZ+GjsxWKlJ8kFfnvQ==", 968 | "path": "microsoft.extensions.configuration/2.1.1", 969 | "hashPath": "microsoft.extensions.configuration.2.1.1.nupkg.sha512" 970 | }, 971 | "Microsoft.Extensions.Configuration.Abstractions/2.1.1": { 972 | "type": "package", 973 | "serviceable": true, 974 | "sha512": "sha512-9EMhOWU2eOQOtMIJ+vfwKJpnLRc1Wl3vXu8qXeevA91cSY4j3WvArmF7ApGtJwa7yKewJTvlQlBSn9OSnLFg6Q==", 975 | "path": "microsoft.extensions.configuration.abstractions/2.1.1", 976 | "hashPath": "microsoft.extensions.configuration.abstractions.2.1.1.nupkg.sha512" 977 | }, 978 | "Microsoft.Extensions.Configuration.FileExtensions/2.1.1": { 979 | "type": "package", 980 | "serviceable": true, 981 | "sha512": "sha512-JnhKotPCs1+X4CPSsHOk8CpxmBeIS/vIXYewsoM8XflXNhpzMe1gfIckQyuRKyORlGaNFEBr4WrPjpZ159bS/Q==", 982 | "path": "microsoft.extensions.configuration.fileextensions/2.1.1", 983 | "hashPath": "microsoft.extensions.configuration.fileextensions.2.1.1.nupkg.sha512" 984 | }, 985 | "Microsoft.Extensions.Configuration.Json/2.1.1": { 986 | "type": "package", 987 | "serviceable": true, 988 | "sha512": "sha512-f6KcI9v0GVA4YL/ExoxrEfeQv9La3hyQnySfgxGkFtMeDJIUun0ANoMjspbdpXXnuaScwgbQ2mFE3lJHt9lpJw==", 989 | "path": "microsoft.extensions.configuration.json/2.1.1", 990 | "hashPath": "microsoft.extensions.configuration.json.2.1.1.nupkg.sha512" 991 | }, 992 | "Microsoft.Extensions.FileProviders.Abstractions/2.1.1": { 993 | "type": "package", 994 | "serviceable": true, 995 | "sha512": "sha512-qOJP+VAlXDeMQSJ6iflW62bEsN3S1NJIPHmhKFA9L37yU+jce2wbwesA7sDe9WdJ8+SoKtLnHPUxvOyQrAcRCA==", 996 | "path": "microsoft.extensions.fileproviders.abstractions/2.1.1", 997 | "hashPath": "microsoft.extensions.fileproviders.abstractions.2.1.1.nupkg.sha512" 998 | }, 999 | "Microsoft.Extensions.FileProviders.Physical/2.1.1": { 1000 | "type": "package", 1001 | "serviceable": true, 1002 | "sha512": "sha512-pbT/J3B686Xgktv5WH11FbcbZXDmBQuCN3ce8IKIF+DpOk3p0RgUPrOXcYNp81TyH+K/5Cosr4VFVjYMoirNDg==", 1003 | "path": "microsoft.extensions.fileproviders.physical/2.1.1", 1004 | "hashPath": "microsoft.extensions.fileproviders.physical.2.1.1.nupkg.sha512" 1005 | }, 1006 | "Microsoft.Extensions.FileSystemGlobbing/2.1.1": { 1007 | "type": "package", 1008 | "serviceable": true, 1009 | "sha512": "sha512-Pu/O8jBc7QlEmqmbDGVosuDlyzGspMuKc71rOsJigwGMF5574aWYw9uRMX+ho1dmbnL502ZYHo6PlBP3IXkm5A==", 1010 | "path": "microsoft.extensions.filesystemglobbing/2.1.1", 1011 | "hashPath": "microsoft.extensions.filesystemglobbing.2.1.1.nupkg.sha512" 1012 | }, 1013 | "Microsoft.Extensions.Primitives/2.1.1": { 1014 | "type": "package", 1015 | "serviceable": true, 1016 | "sha512": "sha512-Svz25/egj1TsNL4118jyMqkhDiu0l8QYWq2p52P4BBN0GbqwR18ZRIctSP5TTDJy0m0EFC8aB2FOVjGtvEGWSA==", 1017 | "path": "microsoft.extensions.primitives/2.1.1", 1018 | "hashPath": "microsoft.extensions.primitives.2.1.1.nupkg.sha512" 1019 | }, 1020 | "Microsoft.NETCore.Targets/1.0.1": { 1021 | "type": "package", 1022 | "serviceable": true, 1023 | "sha512": "sha512-rkn+fKobF/cbWfnnfBOQHKVKIOpxMZBvlSHkqDWgBpwGDcLRduvs3D9OLGeV6GWGvVwNlVi2CBbTjuPmtHvyNw==", 1024 | "path": "microsoft.netcore.targets/1.0.1", 1025 | "hashPath": "microsoft.netcore.targets.1.0.1.nupkg.sha512" 1026 | }, 1027 | "Microsoft.Win32.Primitives/4.0.1": { 1028 | "type": "package", 1029 | "serviceable": true, 1030 | "sha512": "sha512-fQnBHO9DgcmkC9dYSJoBqo6sH1VJwJprUHh8F3hbcRlxiQiBUuTntdk8tUwV490OqC2kQUrinGwZyQHTieuXRA==", 1031 | "path": "microsoft.win32.primitives/4.0.1", 1032 | "hashPath": "microsoft.win32.primitives.4.0.1.nupkg.sha512" 1033 | }, 1034 | "Newtonsoft.Json/11.0.2": { 1035 | "type": "package", 1036 | "serviceable": true, 1037 | "sha512": "sha512-IvJe1pj7JHEsP8B8J8DwlMEx8UInrs/x+9oVY+oCD13jpLu4JbJU2WCIsMRn5C4yW9+DgkaO8uiVE5VHKjpmdQ==", 1038 | "path": "newtonsoft.json/11.0.2", 1039 | "hashPath": "newtonsoft.json.11.0.2.nupkg.sha512" 1040 | }, 1041 | "runtime.native.System/4.0.0": { 1042 | "type": "package", 1043 | "serviceable": true, 1044 | "sha512": "sha512-QfS/nQI7k/BLgmLrw7qm7YBoULEvgWnPI+cYsbfCVFTW8Aj+i8JhccxcFMu1RWms0YZzF+UHguNBK4Qn89e2Sg==", 1045 | "path": "runtime.native.system/4.0.0", 1046 | "hashPath": "runtime.native.system.4.0.0.nupkg.sha512" 1047 | }, 1048 | "runtime.native.System.Net.Http/4.0.1": { 1049 | "type": "package", 1050 | "serviceable": true, 1051 | "sha512": "sha512-Nh0UPZx2Vifh8r+J+H2jxifZUD3sBrmolgiFWJd2yiNrxO0xTa6bAw3YwRn1VOiSen/tUXMS31ttNItCZ6lKuA==", 1052 | "path": "runtime.native.system.net.http/4.0.1", 1053 | "hashPath": "runtime.native.system.net.http.4.0.1.nupkg.sha512" 1054 | }, 1055 | "runtime.native.System.Net.Security/4.0.1": { 1056 | "type": "package", 1057 | "serviceable": true, 1058 | "sha512": "sha512-Az6Ff6rZFb8nYGAaejFR6jr8ktt9f3e1Q/yKdw0pwHNTLaO/1eCAC9vzBoR9YAb0QeZD6fZXl1A9tRB5stpzXA==", 1059 | "path": "runtime.native.system.net.security/4.0.1", 1060 | "hashPath": "runtime.native.system.net.security.4.0.1.nupkg.sha512" 1061 | }, 1062 | "runtime.native.System.Security.Cryptography/4.0.0": { 1063 | "type": "package", 1064 | "serviceable": true, 1065 | "sha512": "sha512-2CQK0jmO6Eu7ZeMgD+LOFbNJSXHFVQbCJJkEyEwowh1SCgYnrn9W9RykMfpeeVGw7h4IBvYikzpGUlmZTUafJw==", 1066 | "path": "runtime.native.system.security.cryptography/4.0.0", 1067 | "hashPath": "runtime.native.system.security.cryptography.4.0.0.nupkg.sha512" 1068 | }, 1069 | "System.Collections/4.0.11": { 1070 | "type": "package", 1071 | "serviceable": true, 1072 | "sha512": "sha512-YUJGz6eFKqS0V//mLt25vFGrrCvOnsXjlvFQs+KimpwNxug9x0Pzy4PlFMU3Q2IzqAa9G2L4LsK3+9vCBK7oTg==", 1073 | "path": "system.collections/4.0.11", 1074 | "hashPath": "system.collections.4.0.11.nupkg.sha512" 1075 | }, 1076 | "System.Collections.Concurrent/4.0.12": { 1077 | "type": "package", 1078 | "serviceable": true, 1079 | "sha512": "sha512-2gBcbb3drMLgxlI0fBfxMA31ec6AEyYCHygGse4vxceJan8mRIWeKJ24BFzN7+bi/NFTgdIgufzb94LWO5EERQ==", 1080 | "path": "system.collections.concurrent/4.0.12", 1081 | "hashPath": "system.collections.concurrent.4.0.12.nupkg.sha512" 1082 | }, 1083 | "System.Collections.NonGeneric/4.0.1": { 1084 | "type": "package", 1085 | "serviceable": true, 1086 | "sha512": "sha512-hMxFT2RhhlffyCdKLDXjx8WEC5JfCvNozAZxCablAuFRH74SCV4AgzE8yJCh/73bFnEoZgJ9MJmkjQ0dJmnKqA==", 1087 | "path": "system.collections.nongeneric/4.0.1", 1088 | "hashPath": "system.collections.nongeneric.4.0.1.nupkg.sha512" 1089 | }, 1090 | "System.Collections.Specialized/4.0.1": { 1091 | "type": "package", 1092 | "serviceable": true, 1093 | "sha512": "sha512-/HKQyVP0yH1I0YtK7KJL/28snxHNH/bi+0lgk/+MbURF6ULhAE31MDI+NZDerNWu264YbxklXCCygISgm+HMug==", 1094 | "path": "system.collections.specialized/4.0.1", 1095 | "hashPath": "system.collections.specialized.4.0.1.nupkg.sha512" 1096 | }, 1097 | "System.Diagnostics.Debug/4.0.11": { 1098 | "type": "package", 1099 | "serviceable": true, 1100 | "sha512": "sha512-w5U95fVKHY4G8ASs/K5iK3J5LY+/dLFd4vKejsnI/ZhBsWS9hQakfx3Zr7lRWKg4tAw9r4iktyvsTagWkqYCiw==", 1101 | "path": "system.diagnostics.debug/4.0.11", 1102 | "hashPath": "system.diagnostics.debug.4.0.11.nupkg.sha512" 1103 | }, 1104 | "System.Diagnostics.DiagnosticSource/4.0.0": { 1105 | "type": "package", 1106 | "serviceable": true, 1107 | "sha512": "sha512-YKglnq4BMTJxfcr6nuT08g+yJ0UxdePIHxosiLuljuHIUR6t4KhFsyaHOaOc1Ofqp0PUvJ0EmcgiEz6T7vEx3w==", 1108 | "path": "system.diagnostics.diagnosticsource/4.0.0", 1109 | "hashPath": "system.diagnostics.diagnosticsource.4.0.0.nupkg.sha512" 1110 | }, 1111 | "System.Diagnostics.TraceSource/4.0.0": { 1112 | "type": "package", 1113 | "serviceable": true, 1114 | "sha512": "sha512-6WVCczFZKXwpWpzd/iJkYnsmWTSFFiU24Xx/YdHXBcu+nFI/ehTgeqdJQFbtRPzbrO3KtRNjvkhtj4t5/WwWsA==", 1115 | "path": "system.diagnostics.tracesource/4.0.0", 1116 | "hashPath": "system.diagnostics.tracesource.4.0.0.nupkg.sha512" 1117 | }, 1118 | "System.Diagnostics.Tracing/4.1.0": { 1119 | "type": "package", 1120 | "serviceable": true, 1121 | "sha512": "sha512-vDN1PoMZCkkdNjvZLql592oYJZgS7URcJzJ7bxeBgGtx5UtR5leNm49VmfHGqIffX4FKacHbI3H6UyNSHQknBg==", 1122 | "path": "system.diagnostics.tracing/4.1.0", 1123 | "hashPath": "system.diagnostics.tracing.4.1.0.nupkg.sha512" 1124 | }, 1125 | "System.Dynamic.Runtime/4.0.11": { 1126 | "type": "package", 1127 | "serviceable": true, 1128 | "sha512": "sha512-db34f6LHYM0U0JpE+sOmjar27BnqTVkbLJhgfwMpTdgTigG/Hna3m2MYVwnFzGGKnEJk2UXFuoVTr8WUbU91/A==", 1129 | "path": "system.dynamic.runtime/4.0.11", 1130 | "hashPath": "system.dynamic.runtime.4.0.11.nupkg.sha512" 1131 | }, 1132 | "System.Globalization/4.0.11": { 1133 | "type": "package", 1134 | "serviceable": true, 1135 | "sha512": "sha512-B95h0YLEL2oSnwF/XjqSWKnwKOy/01VWkNlsCeMTFJLLabflpGV26nK164eRs5GiaRSBGpOxQ3pKoSnnyZN5pg==", 1136 | "path": "system.globalization/4.0.11", 1137 | "hashPath": "system.globalization.4.0.11.nupkg.sha512" 1138 | }, 1139 | "System.Globalization.Calendars/4.0.1": { 1140 | "type": "package", 1141 | "serviceable": true, 1142 | "sha512": "sha512-L1c6IqeQ88vuzC1P81JeHmHA8mxq8a18NUBNXnIY/BVb+TCyAaGIFbhpZt60h9FJNmisymoQkHEFSE9Vslja1Q==", 1143 | "path": "system.globalization.calendars/4.0.1", 1144 | "hashPath": "system.globalization.calendars.4.0.1.nupkg.sha512" 1145 | }, 1146 | "System.Globalization.Extensions/4.0.1": { 1147 | "type": "package", 1148 | "serviceable": true, 1149 | "sha512": "sha512-KKo23iKeOaIg61SSXwjANN7QYDr/3op3OWGGzDzz7mypx0Za0fZSeG0l6cco8Ntp8YMYkIQcAqlk8yhm5/Uhcg==", 1150 | "path": "system.globalization.extensions/4.0.1", 1151 | "hashPath": "system.globalization.extensions.4.0.1.nupkg.sha512" 1152 | }, 1153 | "System.IO/4.1.0": { 1154 | "type": "package", 1155 | "serviceable": true, 1156 | "sha512": "sha512-3KlTJceQc3gnGIaHZ7UBZO26SHL1SHE4ddrmiwumFnId+CEHP+O8r386tZKaE6zlk5/mF8vifMBzHj9SaXN+mQ==", 1157 | "path": "system.io/4.1.0", 1158 | "hashPath": "system.io.4.1.0.nupkg.sha512" 1159 | }, 1160 | "System.IO.FileSystem/4.0.1": { 1161 | "type": "package", 1162 | "serviceable": true, 1163 | "sha512": "sha512-IBErlVq5jOggAD69bg1t0pJcHaDbJbWNUZTPI96fkYWzwYbN6D9wRHMULLDd9dHsl7C2YsxXL31LMfPI1SWt8w==", 1164 | "path": "system.io.filesystem/4.0.1", 1165 | "hashPath": "system.io.filesystem.4.0.1.nupkg.sha512" 1166 | }, 1167 | "System.IO.FileSystem.Primitives/4.0.1": { 1168 | "type": "package", 1169 | "serviceable": true, 1170 | "sha512": "sha512-kWkKD203JJKxJeE74p8aF8y4Qc9r9WQx4C0cHzHPrY3fv/L/IhWnyCHaFJ3H1QPOH6A93whlQ2vG5nHlBDvzWQ==", 1171 | "path": "system.io.filesystem.primitives/4.0.1", 1172 | "hashPath": "system.io.filesystem.primitives.4.0.1.nupkg.sha512" 1173 | }, 1174 | "System.Linq/4.1.0": { 1175 | "type": "package", 1176 | "serviceable": true, 1177 | "sha512": "sha512-bQ0iYFOQI0nuTnt+NQADns6ucV4DUvMdwN6CbkB1yj8i7arTGiTN5eok1kQwdnnNWSDZfIUySQY+J3d5KjWn0g==", 1178 | "path": "system.linq/4.1.0", 1179 | "hashPath": "system.linq.4.1.0.nupkg.sha512" 1180 | }, 1181 | "System.Linq.Expressions/4.1.0": { 1182 | "type": "package", 1183 | "serviceable": true, 1184 | "sha512": "sha512-I+y02iqkgmCAyfbqOmSDOgqdZQ5tTj80Akm5BPSS8EeB0VGWdy6X1KCoYe8Pk6pwDoAKZUOdLVxnTJcExiv5zw==", 1185 | "path": "system.linq.expressions/4.1.0", 1186 | "hashPath": "system.linq.expressions.4.1.0.nupkg.sha512" 1187 | }, 1188 | "System.Linq.Queryable/4.0.1": { 1189 | "type": "package", 1190 | "serviceable": true, 1191 | "sha512": "sha512-Yn/WfYe9RoRfmSLvUt2JerP0BTGGykCZkQPgojaxgzF2N0oPo+/AhB8TXOpdCcNlrG3VRtsamtK2uzsp3cqRVw==", 1192 | "path": "system.linq.queryable/4.0.1", 1193 | "hashPath": "system.linq.queryable.4.0.1.nupkg.sha512" 1194 | }, 1195 | "System.Memory/4.5.1": { 1196 | "type": "package", 1197 | "serviceable": true, 1198 | "sha512": "sha512-vcG3/MbfpxznMkkkaAblJi7RHOmuP7kawQMhDgLSuA1tRpRQYsFSCTxRSINDUgn2QNn2jWeLxv8er5BXbyACkw==", 1199 | "path": "system.memory/4.5.1", 1200 | "hashPath": "system.memory.4.5.1.nupkg.sha512" 1201 | }, 1202 | "System.Net.Http/4.1.0": { 1203 | "type": "package", 1204 | "serviceable": true, 1205 | "sha512": "sha512-ULq9g3SOPVuupt+Y3U+A37coXzdNisB1neFCSKzBwo182u0RDddKJF8I5+HfyXqK6OhJPgeoAwWXrbiUXuRDsg==", 1206 | "path": "system.net.http/4.1.0", 1207 | "hashPath": "system.net.http.4.1.0.nupkg.sha512" 1208 | }, 1209 | "System.Net.NameResolution/4.0.0": { 1210 | "type": "package", 1211 | "serviceable": true, 1212 | "sha512": "sha512-JdqRdM1Qym3YehqdKIi5LHrpypP4JMfxKQSNCJ2z4WawkG0il+N3XfNeJOxll2XrTnG7WgYYPoeiu/KOwg0DQw==", 1213 | "path": "system.net.nameresolution/4.0.0", 1214 | "hashPath": "system.net.nameresolution.4.0.0.nupkg.sha512" 1215 | }, 1216 | "System.Net.NetworkInformation/4.1.0": { 1217 | "type": "package", 1218 | "serviceable": true, 1219 | "sha512": "sha512-Q0rfeiW6QsiZuicGjrFA7cRr2+kXex0JIljTTxzI09GIftB8k+aNL31VsQD1sI2g31cw7UGDTgozA/FgeNSzsQ==", 1220 | "path": "system.net.networkinformation/4.1.0", 1221 | "hashPath": "system.net.networkinformation.4.1.0.nupkg.sha512" 1222 | }, 1223 | "System.Net.Primitives/4.0.11": { 1224 | "type": "package", 1225 | "serviceable": true, 1226 | "sha512": "sha512-hVvfl4405DRjA2408luZekbPhplJK03j2Y2lSfMlny7GHXlkByw1iLnc9mgKW0GdQn73vvMcWrWewAhylXA4Nw==", 1227 | "path": "system.net.primitives/4.0.11", 1228 | "hashPath": "system.net.primitives.4.0.11.nupkg.sha512" 1229 | }, 1230 | "System.Net.Requests/4.0.11": { 1231 | "type": "package", 1232 | "serviceable": true, 1233 | "sha512": "sha512-vxGt7C0cZixN+VqoSW4Yakc1Y9WknmxauDqzxgpw/FnBdz4kQNN51l4wxdXX5VY1xjqy//+G+4CvJWp1+f+y6Q==", 1234 | "path": "system.net.requests/4.0.11", 1235 | "hashPath": "system.net.requests.4.0.11.nupkg.sha512" 1236 | }, 1237 | "System.Net.Security/4.0.0": { 1238 | "type": "package", 1239 | "serviceable": true, 1240 | "sha512": "sha512-uM1JaYJciCc2w7efD6du0EpQ1n5ZQqE6/P43/aI4H5E59qvP+wt3l70KIUF/Ha7NaeXGoGNFPVO0MB80pVHk2g==", 1241 | "path": "system.net.security/4.0.0", 1242 | "hashPath": "system.net.security.4.0.0.nupkg.sha512" 1243 | }, 1244 | "System.Net.Sockets/4.1.0": { 1245 | "type": "package", 1246 | "serviceable": true, 1247 | "sha512": "sha512-xAz0N3dAV/aR/9g8r0Y5oEqU1JRsz29F5EGb/WVHmX3jVSLqi2/92M5hTad2aNWovruXrJpJtgZ9fccPMG9uSw==", 1248 | "path": "system.net.sockets/4.1.0", 1249 | "hashPath": "system.net.sockets.4.1.0.nupkg.sha512" 1250 | }, 1251 | "System.Net.WebHeaderCollection/4.0.1": { 1252 | "type": "package", 1253 | "serviceable": true, 1254 | "sha512": "sha512-XX2TIAN+wBSAIV51BU2FvvXMdstUa8b0FBSZmDWjZdwUMmggQSifpTOZ5fNH20z9ZCg2fkV1L5SsZnpO2RQDRQ==", 1255 | "path": "system.net.webheadercollection/4.0.1", 1256 | "hashPath": "system.net.webheadercollection.4.0.1.nupkg.sha512" 1257 | }, 1258 | "System.ObjectModel/4.0.12": { 1259 | "type": "package", 1260 | "serviceable": true, 1261 | "sha512": "sha512-tAgJM1xt3ytyMoW4qn4wIqgJYm7L7TShRZG4+Q4Qsi2PCcj96pXN7nRywS9KkB3p/xDUjc2HSwP9SROyPYDYKQ==", 1262 | "path": "system.objectmodel/4.0.12", 1263 | "hashPath": "system.objectmodel.4.0.12.nupkg.sha512" 1264 | }, 1265 | "System.Reflection/4.1.0": { 1266 | "type": "package", 1267 | "serviceable": true, 1268 | "sha512": "sha512-JCKANJ0TI7kzoQzuwB/OoJANy1Lg338B6+JVacPl4TpUwi3cReg3nMLplMq2uqYfHFQpKIlHAUVAJlImZz/4ng==", 1269 | "path": "system.reflection/4.1.0", 1270 | "hashPath": "system.reflection.4.1.0.nupkg.sha512" 1271 | }, 1272 | "System.Reflection.Emit/4.0.1": { 1273 | "type": "package", 1274 | "serviceable": true, 1275 | "sha512": "sha512-P2wqAj72fFjpP6wb9nSfDqNBMab+2ovzSDzUZK7MVIm54tBJEPr9jWfSjjoTpPwj1LeKcmX3vr0ttyjSSFM47g==", 1276 | "path": "system.reflection.emit/4.0.1", 1277 | "hashPath": "system.reflection.emit.4.0.1.nupkg.sha512" 1278 | }, 1279 | "System.Reflection.Emit.ILGeneration/4.0.1": { 1280 | "type": "package", 1281 | "serviceable": true, 1282 | "sha512": "sha512-Ov6dU8Bu15Bc7zuqttgHF12J5lwSWyTf1S+FJouUXVMSqImLZzYaQ+vRr1rQ0OZ0HqsrwWl4dsKHELckQkVpgA==", 1283 | "path": "system.reflection.emit.ilgeneration/4.0.1", 1284 | "hashPath": "system.reflection.emit.ilgeneration.4.0.1.nupkg.sha512" 1285 | }, 1286 | "System.Reflection.Emit.Lightweight/4.0.1": { 1287 | "type": "package", 1288 | "serviceable": true, 1289 | "sha512": "sha512-sSzHHXueZ5Uh0OLpUQprhr+ZYJrLPA2Cmr4gn0wj9+FftNKXx8RIMKvO9qnjk2ebPYUjZ+F2ulGdPOsvj+MEjA==", 1290 | "path": "system.reflection.emit.lightweight/4.0.1", 1291 | "hashPath": "system.reflection.emit.lightweight.4.0.1.nupkg.sha512" 1292 | }, 1293 | "System.Reflection.Extensions/4.0.1": { 1294 | "type": "package", 1295 | "serviceable": true, 1296 | "sha512": "sha512-GYrtRsZcMuHF3sbmRHfMYpvxZoIN2bQGrYGerUiWLEkqdEUQZhH3TRSaC/oI4wO0II1RKBPlpIa1TOMxIcOOzQ==", 1297 | "path": "system.reflection.extensions/4.0.1", 1298 | "hashPath": "system.reflection.extensions.4.0.1.nupkg.sha512" 1299 | }, 1300 | "System.Reflection.Primitives/4.0.1": { 1301 | "type": "package", 1302 | "serviceable": true, 1303 | "sha512": "sha512-4inTox4wTBaDhB7V3mPvp9XlCbeGYWVEM9/fXALd52vNEAVisc1BoVWQPuUuD0Ga//dNbA/WeMy9u9mzLxGTHQ==", 1304 | "path": "system.reflection.primitives/4.0.1", 1305 | "hashPath": "system.reflection.primitives.4.0.1.nupkg.sha512" 1306 | }, 1307 | "System.Reflection.TypeExtensions/4.1.0": { 1308 | "type": "package", 1309 | "serviceable": true, 1310 | "sha512": "sha512-tsQ/ptQ3H5FYfON8lL4MxRk/8kFyE0A+tGPXmVP967cT/gzLHYxIejIYSxp4JmIeFHVP78g/F2FE1mUUTbDtrg==", 1311 | "path": "system.reflection.typeextensions/4.1.0", 1312 | "hashPath": "system.reflection.typeextensions.4.1.0.nupkg.sha512" 1313 | }, 1314 | "System.Resources.ResourceManager/4.0.1": { 1315 | "type": "package", 1316 | "serviceable": true, 1317 | "sha512": "sha512-TxwVeUNoTgUOdQ09gfTjvW411MF+w9MBYL7AtNVc+HtBCFlutPLhUCdZjNkjbhj3bNQWMdHboF0KIWEOjJssbA==", 1318 | "path": "system.resources.resourcemanager/4.0.1", 1319 | "hashPath": "system.resources.resourcemanager.4.0.1.nupkg.sha512" 1320 | }, 1321 | "System.Runtime/4.1.0": { 1322 | "type": "package", 1323 | "serviceable": true, 1324 | "sha512": "sha512-v6c/4Yaa9uWsq+JMhnOFewrYkgdNHNG2eMKuNqRn8P733rNXeRCGvV5FkkjBXn2dbVkPXOsO0xjsEeM1q2zC0g==", 1325 | "path": "system.runtime/4.1.0", 1326 | "hashPath": "system.runtime.4.1.0.nupkg.sha512" 1327 | }, 1328 | "System.Runtime.CompilerServices.Unsafe/4.5.1": { 1329 | "type": "package", 1330 | "serviceable": true, 1331 | "sha512": "sha512-qUJMNWhbm9oZ3XaMFiEMiYmRPszbnXIkRIi7+4b2Md2xZ6JUOepf0/kY3S85qistRohl9OdMe4PsO+RdG2kTIQ==", 1332 | "path": "system.runtime.compilerservices.unsafe/4.5.1", 1333 | "hashPath": "system.runtime.compilerservices.unsafe.4.5.1.nupkg.sha512" 1334 | }, 1335 | "System.Runtime.Extensions/4.1.0": { 1336 | "type": "package", 1337 | "serviceable": true, 1338 | "sha512": "sha512-CUOHjTT/vgP0qGW22U4/hDlOqXmcPq5YicBaXdUR2UiUoLwBT+olO6we4DVbq57jeX5uXH2uerVZhf0qGj+sVQ==", 1339 | "path": "system.runtime.extensions/4.1.0", 1340 | "hashPath": "system.runtime.extensions.4.1.0.nupkg.sha512" 1341 | }, 1342 | "System.Runtime.Handles/4.0.1": { 1343 | "type": "package", 1344 | "serviceable": true, 1345 | "sha512": "sha512-nCJvEKguXEvk2ymk1gqj625vVnlK3/xdGzx0vOKicQkoquaTBJTP13AIYkocSUwHCLNBwUbXTqTWGDxBTWpt7g==", 1346 | "path": "system.runtime.handles/4.0.1", 1347 | "hashPath": "system.runtime.handles.4.0.1.nupkg.sha512" 1348 | }, 1349 | "System.Runtime.InteropServices/4.1.0": { 1350 | "type": "package", 1351 | "serviceable": true, 1352 | "sha512": "sha512-16eu3kjHS633yYdkjwShDHZLRNMKVi/s0bY8ODiqJ2RfMhDMAwxZaUaWVnZ2P71kr/or+X9o/xFWtNqz8ivieQ==", 1353 | "path": "system.runtime.interopservices/4.1.0", 1354 | "hashPath": "system.runtime.interopservices.4.1.0.nupkg.sha512" 1355 | }, 1356 | "System.Runtime.Numerics/4.0.1": { 1357 | "type": "package", 1358 | "serviceable": true, 1359 | "sha512": "sha512-+XbKFuzdmLP3d1o9pdHu2nxjNr2OEPqGzKeegPLCUMM71a0t50A/rOcIRmGs9wR7a8KuHX6hYs/7/TymIGLNqg==", 1360 | "path": "system.runtime.numerics/4.0.1", 1361 | "hashPath": "system.runtime.numerics.4.0.1.nupkg.sha512" 1362 | }, 1363 | "System.Runtime.Serialization.Primitives/4.1.1": { 1364 | "type": "package", 1365 | "serviceable": true, 1366 | "sha512": "sha512-HZ6Du5QrTG8MNJbf4e4qMO3JRAkIboGT5Fk804uZtg3Gq516S7hAqTm2UZKUHa7/6HUGdVy3AqMQKbns06G/cg==", 1367 | "path": "system.runtime.serialization.primitives/4.1.1", 1368 | "hashPath": "system.runtime.serialization.primitives.4.1.1.nupkg.sha512" 1369 | }, 1370 | "System.Security.Claims/4.0.1": { 1371 | "type": "package", 1372 | "serviceable": true, 1373 | "sha512": "sha512-4Jlp0OgJLS/Voj1kyFP6MJlIYp3crgfH8kNQk2p7+4JYfc1aAmh9PZyAMMbDhuoolGNtux9HqSOazsioRiDvCw==", 1374 | "path": "system.security.claims/4.0.1", 1375 | "hashPath": "system.security.claims.4.0.1.nupkg.sha512" 1376 | }, 1377 | "System.Security.Cryptography.Algorithms/4.2.0": { 1378 | "type": "package", 1379 | "serviceable": true, 1380 | "sha512": "sha512-8JQFxbLVdrtIOKMDN38Fn0GWnqYZw/oMlwOUG/qz1jqChvyZlnUmu+0s7wLx7JYua/nAXoESpHA3iw11QFWhXg==", 1381 | "path": "system.security.cryptography.algorithms/4.2.0", 1382 | "hashPath": "system.security.cryptography.algorithms.4.2.0.nupkg.sha512" 1383 | }, 1384 | "System.Security.Cryptography.Cng/4.2.0": { 1385 | "type": "package", 1386 | "serviceable": true, 1387 | "sha512": "sha512-cUJ2h+ZvONDe28Szw3st5dOHdjndhJzQ2WObDEXAWRPEQBtVItVoxbXM/OEsTthl3cNn2dk2k0I3y45igCQcLw==", 1388 | "path": "system.security.cryptography.cng/4.2.0", 1389 | "hashPath": "system.security.cryptography.cng.4.2.0.nupkg.sha512" 1390 | }, 1391 | "System.Security.Cryptography.Csp/4.0.0": { 1392 | "type": "package", 1393 | "serviceable": true, 1394 | "sha512": "sha512-/i1Usuo4PgAqgbPNC0NjbO3jPW//BoBlTpcWFD1EHVbidH21y4c1ap5bbEMSGAXjAShhMH4abi/K8fILrnu4BQ==", 1395 | "path": "system.security.cryptography.csp/4.0.0", 1396 | "hashPath": "system.security.cryptography.csp.4.0.0.nupkg.sha512" 1397 | }, 1398 | "System.Security.Cryptography.Encoding/4.0.0": { 1399 | "type": "package", 1400 | "serviceable": true, 1401 | "sha512": "sha512-FbKgE5MbxSQMPcSVRgwM6bXN3GtyAh04NkV8E5zKCBE26X0vYW0UtTa2FIgkH33WVqBVxRgxljlVYumWtU+HcQ==", 1402 | "path": "system.security.cryptography.encoding/4.0.0", 1403 | "hashPath": "system.security.cryptography.encoding.4.0.0.nupkg.sha512" 1404 | }, 1405 | "System.Security.Cryptography.OpenSsl/4.0.0": { 1406 | "type": "package", 1407 | "serviceable": true, 1408 | "sha512": "sha512-HUG/zNUJwEiLkoURDixzkzZdB5yGA5pQhDP93ArOpDPQMteURIGERRNzzoJlmTreLBWr5lkFSjjMSk8ySEpQMw==", 1409 | "path": "system.security.cryptography.openssl/4.0.0", 1410 | "hashPath": "system.security.cryptography.openssl.4.0.0.nupkg.sha512" 1411 | }, 1412 | "System.Security.Cryptography.Primitives/4.0.0": { 1413 | "type": "package", 1414 | "serviceable": true, 1415 | "sha512": "sha512-Wkd7QryWYjkQclX0bngpntW5HSlMzeJU24UaLJQ7YTfI8ydAVAaU2J+HXLLABOVJlKTVvAeL0Aj39VeTe7L+oA==", 1416 | "path": "system.security.cryptography.primitives/4.0.0", 1417 | "hashPath": "system.security.cryptography.primitives.4.0.0.nupkg.sha512" 1418 | }, 1419 | "System.Security.Cryptography.X509Certificates/4.1.0": { 1420 | "type": "package", 1421 | "serviceable": true, 1422 | "sha512": "sha512-4HEfsQIKAhA1+ApNn729Gi09zh+lYWwyIuViihoMDWp1vQnEkL2ct7mAbhBlLYm+x/L4Rr/pyGge1lIY635e0w==", 1423 | "path": "system.security.cryptography.x509certificates/4.1.0", 1424 | "hashPath": "system.security.cryptography.x509certificates.4.1.0.nupkg.sha512" 1425 | }, 1426 | "System.Security.Principal/4.0.1": { 1427 | "type": "package", 1428 | "serviceable": true, 1429 | "sha512": "sha512-On+SKhXY5rzxh/S8wlH1Rm0ogBlu7zyHNxeNBiXauNrhHRXAe9EuX8Yl5IOzLPGU5Z4kLWHMvORDOCG8iu9hww==", 1430 | "path": "system.security.principal/4.0.1", 1431 | "hashPath": "system.security.principal.4.0.1.nupkg.sha512" 1432 | }, 1433 | "System.Security.Principal.Windows/4.0.0": { 1434 | "type": "package", 1435 | "serviceable": true, 1436 | "sha512": "sha512-iFx15AF3RMEPZn3COh8+Bb2Thv2zsmLd93RchS1b8Mj5SNYeGqbYNCSn5AES1+gq56p4ujGZPrl0xN7ngkXOHg==", 1437 | "path": "system.security.principal.windows/4.0.0", 1438 | "hashPath": "system.security.principal.windows.4.0.0.nupkg.sha512" 1439 | }, 1440 | "System.Security.SecureString/4.0.0": { 1441 | "type": "package", 1442 | "serviceable": true, 1443 | "sha512": "sha512-sqzq9GD6/b0yqPuMpgIKBuoLf4VKAj8oAfh4kXSzPaN6eoKY3hRi9C5L27uip25qlU+BGPfb0xh2Rmbwc4jFVA==", 1444 | "path": "system.security.securestring/4.0.0", 1445 | "hashPath": "system.security.securestring.4.0.0.nupkg.sha512" 1446 | }, 1447 | "System.Text.Encoding/4.0.11": { 1448 | "type": "package", 1449 | "serviceable": true, 1450 | "sha512": "sha512-U3gGeMlDZXxCEiY4DwVLSacg+DFWCvoiX+JThA/rvw37Sqrku7sEFeVBBBMBnfB6FeZHsyDx85HlKL19x0HtZA==", 1451 | "path": "system.text.encoding/4.0.11", 1452 | "hashPath": "system.text.encoding.4.0.11.nupkg.sha512" 1453 | }, 1454 | "System.Threading/4.0.11": { 1455 | "type": "package", 1456 | "serviceable": true, 1457 | "sha512": "sha512-N+3xqIcg3VDKyjwwCGaZ9HawG9aC6cSDI+s7ROma310GQo8vilFZa86hqKppwTHleR/G0sfOzhvgnUxWCR/DrQ==", 1458 | "path": "system.threading/4.0.11", 1459 | "hashPath": "system.threading.4.0.11.nupkg.sha512" 1460 | }, 1461 | "System.Threading.Overlapped/4.0.1": { 1462 | "type": "package", 1463 | "serviceable": true, 1464 | "sha512": "sha512-f7aLuLkBoCQM2kng7zqLFBXz9Gk48gDK8lk1ih9rH/1arJJzZK9gJwNvPDhL6Ps/l6rwOr8jw+4FCHL0KKWiEg==", 1465 | "path": "system.threading.overlapped/4.0.1", 1466 | "hashPath": "system.threading.overlapped.4.0.1.nupkg.sha512" 1467 | }, 1468 | "System.Threading.Tasks/4.0.11": { 1469 | "type": "package", 1470 | "serviceable": true, 1471 | "sha512": "sha512-k1S4Gc6IGwtHGT8188RSeGaX86Qw/wnrgNLshJvsdNUOPP9etMmo8S07c+UlOAx4K/xLuN9ivA1bD0LVurtIxQ==", 1472 | "path": "system.threading.tasks/4.0.11", 1473 | "hashPath": "system.threading.tasks.4.0.11.nupkg.sha512" 1474 | }, 1475 | "System.Threading.Thread/4.0.0": { 1476 | "type": "package", 1477 | "serviceable": true, 1478 | "sha512": "sha512-gIdJqDXlOr5W9zeqFErLw3dsOsiShSCYtF9SEHitACycmvNvY8odf9kiKvp6V7aibc8C4HzzNBkWXjyfn7plbQ==", 1479 | "path": "system.threading.thread/4.0.0", 1480 | "hashPath": "system.threading.thread.4.0.0.nupkg.sha512" 1481 | }, 1482 | "System.Threading.ThreadPool/4.0.10": { 1483 | "type": "package", 1484 | "serviceable": true, 1485 | "sha512": "sha512-IMXgB5Vf/5Qw1kpoVgJMOvUO1l32aC+qC3OaIZjWJOjvcxuxNWOK2ZTWWYXfij22NHxT2j1yWX5vlAeQWld9vA==", 1486 | "path": "system.threading.threadpool/4.0.10", 1487 | "hashPath": "system.threading.threadpool.4.0.10.nupkg.sha512" 1488 | } 1489 | } 1490 | } -------------------------------------------------------------------------------- /Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/SampleApp1/bin/Debug/netcoreapp2.0/SampleApp1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Guide-to-NoSQL-with-Azure-Cosmos-DB/562c99197eb17b61be4f110966dc3b3984fad1f6/Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/SampleApp1/bin/Debug/netcoreapp2.0/SampleApp1.dll -------------------------------------------------------------------------------- /Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/SampleApp1/bin/Debug/netcoreapp2.0/SampleApp1.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Guide-to-NoSQL-with-Azure-Cosmos-DB/562c99197eb17b61be4f110966dc3b3984fad1f6/Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/SampleApp1/bin/Debug/netcoreapp2.0/SampleApp1.pdb -------------------------------------------------------------------------------- /Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/SampleApp1/bin/Debug/netcoreapp2.0/SampleApp1.runtimeconfig.dev.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeOptions": { 3 | "additionalProbingPaths": [ 4 | "C:\\Users\\gaston\\.dotnet\\store\\|arch|\\|tfm|", 5 | "C:\\Users\\gaston\\.nuget\\packages", 6 | "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder" 7 | ] 8 | } 9 | } -------------------------------------------------------------------------------- /Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/SampleApp1/bin/Debug/netcoreapp2.0/SampleApp1.runtimeconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeOptions": { 3 | "tfm": "netcoreapp2.0", 4 | "framework": { 5 | "name": "Microsoft.NETCore.App", 6 | "version": "2.0.0" 7 | } 8 | } 9 | } -------------------------------------------------------------------------------- /Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/SampleApp1/bin/Debug/netcoreapp2.0/configuration.json: -------------------------------------------------------------------------------- 1 | // Development configuration values 2 | { 3 | "CosmosDB": { 4 | // Replace with the endpoint URL for your Azure Cosmos DB account 5 | "endpointUrl": "https://example001.documents.azure.com:443/", 6 | // Replace with the read-write primary key for your Azure Cosmos DB account 7 | "authorizationKey": "Yf36lYUZvcv5WJjbcse4T0WqpgcbXIHkf74XKAhLNATJA7Dh6afsVZg7mMhKoKq42hyaXoOixQLTQj8WLCdETg==", 8 | // Replace with your desired database id 9 | "databaseId": "Competition", 10 | // Replace with your desired collection id 11 | "collectionId": "Competitions1" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/SampleApp1/configuration.json: -------------------------------------------------------------------------------- 1 | // Development configuration values 2 | { 3 | "CosmosDB": { 4 | // Replace with the endpoint URL for your Azure Cosmos DB account 5 | "endpointUrl": "https://example001.documents.azure.com:443/", 6 | // Replace with the read-write primary key for your Azure Cosmos DB account 7 | "authorizationKey": "Yf36lYUZvcv5WJjbcse4T0WqpgcbXIHkf74XKAhLNATJA7Dh6afsVZg7mMhKoKq42hyaXoOixQLTQj8WLCdETg==", 8 | // Replace with your desired database id 9 | "databaseId": "Competition", 10 | // Replace with your desired collection id 11 | "collectionId": "Competitions1" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/SampleApp1/obj/Debug/netcoreapp2.0/SampleApp1.AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | using System; 12 | using System.Reflection; 13 | 14 | [assembly: System.Reflection.AssemblyCompanyAttribute("SampleApp1")] 15 | [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] 16 | [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] 17 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] 18 | [assembly: System.Reflection.AssemblyProductAttribute("SampleApp1")] 19 | [assembly: System.Reflection.AssemblyTitleAttribute("SampleApp1")] 20 | [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] 21 | 22 | // Generated by the MSBuild WriteCodeFragment class. 23 | 24 | -------------------------------------------------------------------------------- /Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/SampleApp1/obj/Debug/netcoreapp2.0/SampleApp1.AssemblyInfoInputs.cache: -------------------------------------------------------------------------------- 1 | 55cb037ef66bddd965bae939a154e7d4962d61bb 2 | -------------------------------------------------------------------------------- /Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/SampleApp1/obj/Debug/netcoreapp2.0/SampleApp1.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 8def92b01a237abe175790937737f5046d506398 2 | -------------------------------------------------------------------------------- /Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/SampleApp1/obj/Debug/netcoreapp2.0/SampleApp1.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | D:\Packt\CosmosDB\Code\SampleApp1\SampleApp1\bin\Debug\netcoreapp2.0\SampleApp1.deps.json 2 | D:\Packt\CosmosDB\Code\SampleApp1\SampleApp1\bin\Debug\netcoreapp2.0\SampleApp1.runtimeconfig.json 3 | D:\Packt\CosmosDB\Code\SampleApp1\SampleApp1\bin\Debug\netcoreapp2.0\SampleApp1.runtimeconfig.dev.json 4 | D:\Packt\CosmosDB\Code\SampleApp1\SampleApp1\bin\Debug\netcoreapp2.0\SampleApp1.dll 5 | D:\Packt\CosmosDB\Code\SampleApp1\SampleApp1\obj\Debug\netcoreapp2.0\SampleApp1.csprojAssemblyReference.cache 6 | D:\Packt\CosmosDB\Code\SampleApp1\SampleApp1\obj\Debug\netcoreapp2.0\SampleApp1.csproj.CoreCompileInputs.cache 7 | D:\Packt\CosmosDB\Code\SampleApp1\SampleApp1\obj\Debug\netcoreapp2.0\SampleApp1.AssemblyInfoInputs.cache 8 | D:\Packt\CosmosDB\Code\SampleApp1\SampleApp1\obj\Debug\netcoreapp2.0\SampleApp1.AssemblyInfo.cs 9 | D:\Packt\CosmosDB\Code\SampleApp1\SampleApp1\bin\Debug\netcoreapp2.0\SampleApp1.pdb 10 | D:\Packt\CosmosDB\Code\SampleApp1\SampleApp1\obj\Debug\netcoreapp2.0\SampleApp1.dll 11 | D:\Packt\CosmosDB\Code\SampleApp1\SampleApp1\obj\Debug\netcoreapp2.0\SampleApp1.pdb 12 | D:\Packt\CosmosDB\Code\SampleApp1\SampleApp1\bin\Debug\netcoreapp2.0\configuration.json 13 | D:\Packt\CosmosDB\Code\SampleApp1\SampleApp1\bin\Debug\netcoreapp2.0\Microsoft.Azure.Documents.ServiceInterop.dll 14 | D:\Packt\CosmosDB\Code\SampleApp1\SampleApp1\bin\Debug\netcoreapp2.0\DocumentDB.Spatial.Sql.dll 15 | D:\Packt\CosmosDB\Code\SampleApp2\SampleApp1\bin\Debug\netcoreapp2.0\Microsoft.Azure.Documents.ServiceInterop.dll 16 | D:\Packt\CosmosDB\Code\SampleApp2\SampleApp1\bin\Debug\netcoreapp2.0\DocumentDB.Spatial.Sql.dll 17 | D:\Packt\CosmosDB\Code\SampleApp2\SampleApp1\bin\Debug\netcoreapp2.0\configuration.json 18 | D:\Packt\CosmosDB\Code\SampleApp2\SampleApp1\bin\Debug\netcoreapp2.0\SampleApp1.deps.json 19 | D:\Packt\CosmosDB\Code\SampleApp2\SampleApp1\bin\Debug\netcoreapp2.0\SampleApp1.runtimeconfig.json 20 | D:\Packt\CosmosDB\Code\SampleApp2\SampleApp1\bin\Debug\netcoreapp2.0\SampleApp1.runtimeconfig.dev.json 21 | D:\Packt\CosmosDB\Code\SampleApp2\SampleApp1\bin\Debug\netcoreapp2.0\SampleApp1.dll 22 | D:\Packt\CosmosDB\Code\SampleApp2\SampleApp1\bin\Debug\netcoreapp2.0\SampleApp1.pdb 23 | D:\Packt\CosmosDB\Code\SampleApp2\SampleApp1\obj\Debug\netcoreapp2.0\SampleApp1.csproj.CoreCompileInputs.cache 24 | D:\Packt\CosmosDB\Code\SampleApp2\SampleApp1\obj\Debug\netcoreapp2.0\SampleApp1.AssemblyInfoInputs.cache 25 | D:\Packt\CosmosDB\Code\SampleApp2\SampleApp1\obj\Debug\netcoreapp2.0\SampleApp1.AssemblyInfo.cs 26 | D:\Packt\CosmosDB\Code\SampleApp2\SampleApp1\obj\Debug\netcoreapp2.0\SampleApp1.dll 27 | D:\Packt\CosmosDB\Code\SampleApp2\SampleApp1\obj\Debug\netcoreapp2.0\SampleApp1.pdb 28 | D:\Packt\CosmosDB\Code\SampleApp2\SampleApp1\obj\Debug\netcoreapp2.0\SampleApp1.csprojAssemblyReference.cache 29 | -------------------------------------------------------------------------------- /Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/SampleApp1/obj/Debug/netcoreapp2.0/SampleApp1.csprojAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Guide-to-NoSQL-with-Azure-Cosmos-DB/562c99197eb17b61be4f110966dc3b3984fad1f6/Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/SampleApp1/obj/Debug/netcoreapp2.0/SampleApp1.csprojAssemblyReference.cache -------------------------------------------------------------------------------- /Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/SampleApp1/obj/Debug/netcoreapp2.0/SampleApp1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Guide-to-NoSQL-with-Azure-Cosmos-DB/562c99197eb17b61be4f110966dc3b3984fad1f6/Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/SampleApp1/obj/Debug/netcoreapp2.0/SampleApp1.dll -------------------------------------------------------------------------------- /Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/SampleApp1/obj/Debug/netcoreapp2.0/SampleApp1.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Guide-to-NoSQL-with-Azure-Cosmos-DB/562c99197eb17b61be4f110966dc3b3984fad1f6/Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/SampleApp1/obj/Debug/netcoreapp2.0/SampleApp1.pdb -------------------------------------------------------------------------------- /Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/SampleApp1/obj/SampleApp1.csproj.nuget.cache: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "dgSpecHash": "DoWIZ9ZK/Lr2BekZ8mN4aeN9cC51qIzMMTfXprz9JhL9bl0ggReukRRhV2ONIJzAi9x7Jfx+yomgNODJoJNv/w==", 4 | "success": true 5 | } -------------------------------------------------------------------------------- /Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/SampleApp1/obj/SampleApp1.csproj.nuget.g.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | True 5 | NuGet 6 | D:\Packt\CosmosDB\Code\SampleApp2\SampleApp1\obj\project.assets.json 7 | $(UserProfile)\.nuget\packages\ 8 | C:\Users\gaston\.nuget\packages\;C:\Program Files\dotnet\sdk\NuGetFallbackFolder 9 | PackageReference 10 | 4.7.0 11 | 12 | 13 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Code files/Chapter05/learning_cosmos_db_05_01/SampleApp2/SampleApp1/obj/SampleApp1.csproj.nuget.g.targets: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Code files/Chapter06/learning_cosmos_db_06_01/SampleApp3/.vs/SampleApp1/DesignTimeBuild/.dtbcache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Guide-to-NoSQL-with-Azure-Cosmos-DB/562c99197eb17b61be4f110966dc3b3984fad1f6/Code files/Chapter06/learning_cosmos_db_06_01/SampleApp3/.vs/SampleApp1/DesignTimeBuild/.dtbcache -------------------------------------------------------------------------------- /Code files/Chapter06/learning_cosmos_db_06_01/SampleApp3/.vs/SampleApp1/v15/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Guide-to-NoSQL-with-Azure-Cosmos-DB/562c99197eb17b61be4f110966dc3b3984fad1f6/Code files/Chapter06/learning_cosmos_db_06_01/SampleApp3/.vs/SampleApp1/v15/.suo -------------------------------------------------------------------------------- /Code files/Chapter06/learning_cosmos_db_06_01/SampleApp3/.vs/SampleApp1/v15/Server/sqlite3/db.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Guide-to-NoSQL-with-Azure-Cosmos-DB/562c99197eb17b61be4f110966dc3b3984fad1f6/Code files/Chapter06/learning_cosmos_db_06_01/SampleApp3/.vs/SampleApp1/v15/Server/sqlite3/db.lock -------------------------------------------------------------------------------- /Code files/Chapter06/learning_cosmos_db_06_01/SampleApp3/.vs/SampleApp1/v15/Server/sqlite3/storage.ide: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Guide-to-NoSQL-with-Azure-Cosmos-DB/562c99197eb17b61be4f110966dc3b3984fad1f6/Code files/Chapter06/learning_cosmos_db_06_01/SampleApp3/.vs/SampleApp1/v15/Server/sqlite3/storage.ide -------------------------------------------------------------------------------- /Code files/Chapter06/learning_cosmos_db_06_01/SampleApp3/.vs/SampleApp1/v15/Server/sqlite3/storage.ide-shm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Guide-to-NoSQL-with-Azure-Cosmos-DB/562c99197eb17b61be4f110966dc3b3984fad1f6/Code files/Chapter06/learning_cosmos_db_06_01/SampleApp3/.vs/SampleApp1/v15/Server/sqlite3/storage.ide-shm -------------------------------------------------------------------------------- /Code files/Chapter06/learning_cosmos_db_06_01/SampleApp3/.vs/SampleApp1/v15/Server/sqlite3/storage.ide-wal: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Guide-to-NoSQL-with-Azure-Cosmos-DB/562c99197eb17b61be4f110966dc3b3984fad1f6/Code files/Chapter06/learning_cosmos_db_06_01/SampleApp3/.vs/SampleApp1/v15/Server/sqlite3/storage.ide-wal -------------------------------------------------------------------------------- /Code files/Chapter06/learning_cosmos_db_06_01/SampleApp3/SampleApp1.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27703.2035 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleApp1", "SampleApp1\SampleApp1.csproj", "{2242DCB1-A88B-4BC4-8092-8B236026579D}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {2242DCB1-A88B-4BC4-8092-8B236026579D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {2242DCB1-A88B-4BC4-8092-8B236026579D}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {2242DCB1-A88B-4BC4-8092-8B236026579D}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {2242DCB1-A88B-4BC4-8092-8B236026579D}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {00DD2A9E-F9CA-4A4B-85A0-3F779E1F61A9} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /Code files/Chapter06/learning_cosmos_db_06_01/SampleApp3/SampleApp1/Models/Competition.cs: -------------------------------------------------------------------------------- 1 | namespace SampleApp1.Models 2 | { 3 | using Microsoft.Azure.Documents; 4 | using Newtonsoft.Json; 5 | using Newtonsoft.Json.Converters; 6 | using SampleApp1.Types; 7 | using System; 8 | 9 | public class Competition: Document 10 | { 11 | [JsonProperty(PropertyName = "title")] 12 | public string Title { get; set; } 13 | 14 | [JsonProperty(PropertyName = "location")] 15 | public Location Location { get; set; } 16 | 17 | [JsonProperty(PropertyName = "platforms")] 18 | public GamingPlatform[] Platforms { get; set; } 19 | 20 | [JsonProperty(PropertyName = "games")] 21 | public string[] Games { get; set; } 22 | 23 | [JsonProperty(PropertyName = "numberOfRegisteredCompetitors")] 24 | public int NumberOfRegisteredCompetitors { get; set; } 25 | 26 | [JsonProperty(PropertyName = "numberOfCompetitors")] 27 | public int NumberOfCompetitors { get; set; } 28 | 29 | [JsonProperty(PropertyName = "numberOfViewers")] 30 | public int NumberOfViewers { get; set; } 31 | 32 | [JsonProperty(PropertyName = "status")] 33 | [JsonConverter(typeof(StringEnumConverter))] 34 | public CompetitionStatus Status { get; set; } 35 | 36 | [JsonProperty(PropertyName = "dateTime")] 37 | public DateTime DateTime { get; set; } 38 | 39 | [JsonProperty(PropertyName = "winners")] 40 | public Winner[] Winners { get; set; } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Code files/Chapter06/learning_cosmos_db_06_01/SampleApp3/SampleApp1/Models/Location.cs: -------------------------------------------------------------------------------- 1 | namespace SampleApp1.Models 2 | { 3 | using Newtonsoft.Json; 4 | 5 | public class Location 6 | { 7 | [JsonProperty(PropertyName = "zipCode")] 8 | public string ZipCode { get; set; } 9 | 10 | [JsonProperty(PropertyName = "state")] 11 | public string State { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Code files/Chapter06/learning_cosmos_db_06_01/SampleApp3/SampleApp1/Models/Player.cs: -------------------------------------------------------------------------------- 1 | namespace SampleApp1.Models 2 | { 3 | using Newtonsoft.Json; 4 | 5 | public class Player 6 | { 7 | [JsonProperty(PropertyName = "nickName")] 8 | public string NickName { get; set; } 9 | 10 | [JsonProperty(PropertyName = "country")] 11 | public string Country { get; set; } 12 | 13 | [JsonProperty(PropertyName = "city")] 14 | public string City { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Code files/Chapter06/learning_cosmos_db_06_01/SampleApp3/SampleApp1/Models/Winner.cs: -------------------------------------------------------------------------------- 1 | namespace SampleApp1.Models 2 | { 3 | using Newtonsoft.Json; 4 | 5 | public class Winner 6 | { 7 | [JsonProperty(PropertyName = "player")] 8 | public Player Player { get; set; } 9 | 10 | [JsonProperty(PropertyName = "position")] 11 | public int Position { get; set; } 12 | 13 | [JsonProperty(PropertyName = "score")] 14 | public int Score { get; set; } 15 | 16 | [JsonProperty(PropertyName = "prize")] 17 | public int Prize { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Code files/Chapter06/learning_cosmos_db_06_01/SampleApp3/SampleApp1/Program.cs: -------------------------------------------------------------------------------- 1 | namespace SampleApp1 2 | { 3 | using Microsoft.Azure.Documents; 4 | using Microsoft.Azure.Documents.Client; 5 | using Microsoft.Azure.Documents.Linq; 6 | using Microsoft.Extensions.Configuration; 7 | using System; 8 | using System.Linq; 9 | using System.Threading.Tasks; 10 | using SampleApp1.Models; 11 | using SampleApp1.Types; 12 | using System.Collections.Generic; 13 | 14 | public class Program 15 | { 16 | private static string databaseId; 17 | private static string collectionId; 18 | private static DocumentClient client; 19 | private static Uri collectionUri; 20 | 21 | public static void Main(string[] args) 22 | { 23 | var configurationBuilder = new ConfigurationBuilder(); 24 | configurationBuilder.AddJsonFile("configuration.json", optional: false, reloadOnChange: false); 25 | var configuration = configurationBuilder.Build(); 26 | string endpointUrl = configuration["CosmosDB:endpointUrl"]; 27 | string authorizationKey = configuration["CosmosDB:authorizationKey"]; 28 | databaseId = configuration["CosmosDB:databaseId"]; 29 | collectionId = configuration["CosmosDB:collectionId"]; 30 | try 31 | { 32 | using (client = new DocumentClient(new Uri(endpointUrl), authorizationKey)) 33 | { 34 | CreateAndQueryCompetitionsWithLinqAsync().Wait(); 35 | } 36 | } 37 | catch (DocumentClientException dce) 38 | { 39 | var baseException = dce.GetBaseException(); 40 | Console.WriteLine( 41 | $"DocumentClientException occurred. Status code: {dce.StatusCode}; Message: {dce.Message}; Base exception message: {baseException.Message}"); 42 | } 43 | catch (Exception e) 44 | { 45 | var baseException = e.GetBaseException(); 46 | Console.WriteLine( 47 | $"Exception occurred. Message: {e.Message}; Base exception message: {baseException.Message}"); 48 | } 49 | finally 50 | { 51 | Console.WriteLine("Press any key to exit the console application."); 52 | Console.ReadKey(); 53 | } 54 | } 55 | 56 | private static async Task RetrieveOrCreateDatabaseAsync() 57 | { 58 | // Create a new document database if it doesn’t exist 59 | var databaseResponse = await client.CreateDatabaseIfNotExistsAsync( 60 | new Database 61 | { 62 | Id = databaseId, 63 | }); 64 | switch (databaseResponse.StatusCode) 65 | { 66 | case System.Net.HttpStatusCode.Created: 67 | Console.WriteLine($"The database {databaseId} has been created."); 68 | break; 69 | case System.Net.HttpStatusCode.OK: 70 | Console.WriteLine($"The database {databaseId} has been retrieved."); 71 | break; 72 | } 73 | return databaseResponse.Resource; 74 | } 75 | 76 | private static async Task UpdateOfferForCollectionAsync(string collectionSelfLink, int newOfferThroughput) 77 | { 78 | // Create an asynchronous query to retrieve the current offer for the document collection 79 | // Notice that the current version of the API only allows to use the SelfLink for the collection 80 | // to retrieve its associated offer 81 | Offer existingOffer = null; 82 | var offerQuery = client.CreateOfferQuery() 83 | .Where(o => o.ResourceLink == collectionSelfLink) 84 | .AsDocumentQuery(); 85 | while (offerQuery.HasMoreResults) 86 | { 87 | foreach (var offer in await offerQuery.ExecuteNextAsync()) 88 | { 89 | existingOffer = offer; 90 | } 91 | } 92 | if (existingOffer == null) 93 | { 94 | throw new Exception("I couldn't retrieve the offer for the collection."); 95 | } 96 | // Set the desired throughput to newOfferThroughput RU/s for the new offer built based on the current offer 97 | var newOffer = new OfferV2(existingOffer, newOfferThroughput); 98 | var replaceOfferResponse = await client.ReplaceOfferAsync(newOffer); 99 | 100 | return replaceOfferResponse.Resource; 101 | } 102 | 103 | private static async Task CreateCollectionIfNotExistsAsync() 104 | { 105 | var databaseUri = UriFactory.CreateDatabaseUri(databaseId); 106 | DocumentCollection documentCollectionResource; 107 | var isCollectionCreated = await client.CreateDocumentCollectionQuery(databaseUri) 108 | .Where(c => c.Id == collectionId) 109 | .CountAsync() == 1; 110 | if (isCollectionCreated) 111 | { 112 | Console.WriteLine($"The collection {collectionId} already exists."); 113 | var documentCollectionUri = UriFactory.CreateDocumentCollectionUri(databaseId, collectionId); 114 | var documentCollectionResponse = await client.ReadDocumentCollectionAsync(documentCollectionUri); 115 | documentCollectionResource = documentCollectionResponse.Resource; 116 | } 117 | else 118 | { 119 | var documentCollection = new DocumentCollection 120 | { 121 | Id = collectionId, 122 | }; 123 | documentCollection.PartitionKey.Paths.Add("/location/zipCode"); 124 | var uniqueKey = new UniqueKey(); 125 | uniqueKey.Paths.Add("/title"); 126 | documentCollection.UniqueKeyPolicy.UniqueKeys.Add(uniqueKey); 127 | var requestOptions = new RequestOptions 128 | { 129 | OfferThroughput = 1000, 130 | }; 131 | var collectionResponse = await client.CreateDocumentCollectionAsync( 132 | databaseUri, 133 | documentCollection, 134 | requestOptions); 135 | if (collectionResponse.StatusCode == System.Net.HttpStatusCode.Created) 136 | { 137 | Console.WriteLine($"The collection {collectionId} has been created."); 138 | } 139 | documentCollectionResource = collectionResponse.Resource; 140 | } 141 | 142 | return documentCollectionResource; 143 | } 144 | 145 | private static async Task GetCompetitionByTitleWithLinq(string title) 146 | { 147 | // Build a query to retrieve a Competition with a specific title 148 | var documentQuery = client.CreateDocumentQuery(collectionUri, 149 | new FeedOptions() 150 | { 151 | EnableCrossPartitionQuery = true, 152 | MaxItemCount = 1 153 | }) 154 | .Where(c => c.Title == title) 155 | .Select(c => c) 156 | .AsDocumentQuery(); 157 | while (documentQuery.HasMoreResults) 158 | { 159 | var feedResponse = await documentQuery.ExecuteNextAsync(); 160 | foreach (var competition in feedResponse) 161 | { 162 | Console.WriteLine( 163 | $"The Competition with the following title exists: {title}"); 164 | Console.WriteLine(competition); 165 | return competition; 166 | } 167 | } 168 | 169 | // No matching document found 170 | return null; 171 | } 172 | 173 | private static async Task InsertCompetition(Competition competition) 174 | { 175 | var documentResponse = await client.CreateDocumentAsync(collectionUri, competition); 176 | 177 | if (documentResponse.StatusCode == System.Net.HttpStatusCode.Created) 178 | { 179 | Console.WriteLine($"The {competition.Status} competition with the title {competition.Title} has been created."); 180 | } 181 | 182 | Competition insertedCompetition = (dynamic) documentResponse.Resource; 183 | return insertedCompetition; 184 | } 185 | 186 | private static async Task InsertCompetition3() 187 | { 188 | var competition = new Competition 189 | { 190 | Id = "3", 191 | Title = "League of legends - San Diego 2018", 192 | Location = new Location 193 | { 194 | ZipCode = "92075", 195 | State = "CA" 196 | }, 197 | Platforms = new[] 198 | { 199 | GamingPlatform.Switch 200 | }, 201 | Games = new[] 202 | { 203 | "Fortnite", "NBA Live 19", "PES 2019" 204 | }, 205 | NumberOfRegisteredCompetitors = 80, 206 | NumberOfCompetitors = 30, 207 | NumberOfViewers = 390, 208 | Status = CompetitionStatus.Finished, 209 | DateTime = DateTime.UtcNow.AddDays(-20), 210 | Winners = new[] 211 | { 212 | new Winner 213 | { 214 | Player = new Player 215 | { 216 | NickName = "BrandonMilazzo", 217 | Country = "Italy", 218 | City = "Milazzo" 219 | }, 220 | Position = 1, 221 | Score = 12850, 222 | Prize = 800 223 | }, 224 | new Winner 225 | { 226 | Player = new Player 227 | { 228 | NickName = "Kevin Maverick", 229 | Country = "Ireland", 230 | City = "Dublin" 231 | }, 232 | Position = 2, 233 | Score = 12500, 234 | Prize = 400 235 | }, 236 | }, 237 | }; 238 | 239 | return await InsertCompetition(competition); 240 | } 241 | 242 | private static async Task InsertCompetition4() 243 | { 244 | // Insert a document related to a competition that is scheduled 245 | // and doesn’t have winners yet 246 | var competition = new Competition 247 | { 248 | Id = "4", 249 | Title = "League of legends - San Diego 2019", 250 | Location = new Location 251 | { 252 | ZipCode = "92075", 253 | State = "CA" 254 | }, 255 | Platforms = new[] 256 | { 257 | GamingPlatform.Switch, GamingPlatform.PC, GamingPlatform.XBox 258 | }, 259 | Games = new[] 260 | { 261 | "Madden NFL 19", "Fortnite" 262 | }, 263 | Status = CompetitionStatus.Scheduled, 264 | DateTime = DateTime.UtcNow.AddDays(300), 265 | }; 266 | 267 | return await InsertCompetition(competition); 268 | } 269 | 270 | private static async Task DoesCompetitionWithTitleExistWithLinq(string competitionTitle) 271 | { 272 | var competitionsCount = await client.CreateDocumentQuery(collectionUri, 273 | new FeedOptions() 274 | { 275 | EnableCrossPartitionQuery = true, 276 | MaxItemCount = 1, 277 | }) 278 | .Where(c => c.Title == competitionTitle) 279 | .CountAsync(); 280 | 281 | return (competitionsCount == 1); 282 | } 283 | 284 | private static async Task UpdateScheduledCompetitionWithPlatforms(string competitionId, 285 | string competitionLocationZipCode, 286 | DateTime newDateTime, 287 | int newNumberOfRegisteredCompetitors, 288 | IList newGamingPlatforms) 289 | { 290 | // Retrieve a document related to a competition that is scheduled 291 | // and update its date, number of registered competitors and platforms 292 | // The read operation requires the partition key 293 | var documentToUpdateUri = UriFactory.CreateDocumentUri(databaseId, collectionId, competitionId); 294 | var readCompetitionResponse = await client.ReadDocumentAsync(documentToUpdateUri, new RequestOptions() 295 | { 296 | PartitionKey = new PartitionKey(competitionLocationZipCode) 297 | }); 298 | readCompetitionResponse.Document.DateTime = newDateTime; 299 | readCompetitionResponse.Document.NumberOfRegisteredCompetitors = newNumberOfRegisteredCompetitors; 300 | readCompetitionResponse.Document.Platforms = newGamingPlatforms.ToArray(); 301 | 302 | var updatedCompetitionResponse = await client.ReplaceDocumentAsync( 303 | documentToUpdateUri, 304 | readCompetitionResponse.Document); 305 | 306 | if (updatedCompetitionResponse.StatusCode == System.Net.HttpStatusCode.OK) 307 | { 308 | Console.WriteLine($"The competition with id {competitionId} has been updated."); 309 | } 310 | 311 | Competition updatedCompetition = (dynamic)updatedCompetitionResponse.Resource; 312 | return updatedCompetition; 313 | } 314 | 315 | private static async Task InsertCompetition2(string competitionId, 316 | string competitionTitle, 317 | string competitionLocationZipCode) 318 | { 319 | // Insert a document related to a competition that is scheduled 320 | // and doesn’t have winners yet 321 | var collectionUri = UriFactory.CreateDocumentCollectionUri(databaseId, collectionId); 322 | var documentResponse = await client.CreateDocumentAsync(collectionUri, new 323 | { 324 | id = competitionId, 325 | title = competitionTitle, 326 | location = new 327 | { 328 | zipCode = competitionLocationZipCode, 329 | state = "CA", 330 | }, 331 | platforms = new[] 332 | { 333 | "PC", "PS4", "XBox" 334 | }, 335 | games = new[] 336 | { 337 | "Madden NFL 19", "Fortnite" 338 | }, 339 | numberOfRegisteredCompetitors = 160, 340 | status = "Scheduled", 341 | dateTime = DateTime.UtcNow.AddDays(50), 342 | }); 343 | 344 | if (documentResponse.StatusCode == System.Net.HttpStatusCode.Created) 345 | { 346 | Console.WriteLine($"The competition with the title {competitionTitle} has been created."); 347 | } 348 | 349 | return documentResponse.Resource; 350 | } 351 | 352 | private static async Task DoesCompetitionWithTitleExist(string competitionTitle) 353 | { 354 | bool exists = false; 355 | // Retrieve the number of documents with a specific title 356 | // Very important: Cross partition queries only support 'VALUE ' for aggregates 357 | var collectionUri = UriFactory.CreateDocumentCollectionUri(databaseId, collectionId); 358 | var documentCountQuery = client.CreateDocumentQuery(collectionUri, 359 | $"SELECT VALUE COUNT(1) FROM Competitions c WHERE c.title = '{competitionTitle}'", 360 | new FeedOptions() 361 | { 362 | EnableCrossPartitionQuery = true, 363 | MaxItemCount = 1, 364 | }) 365 | .AsDocumentQuery(); 366 | while (documentCountQuery.HasMoreResults) 367 | { 368 | var documentCountQueryResult = await documentCountQuery.ExecuteNextAsync(); 369 | exists = (documentCountQueryResult.FirstOrDefault() == 1); 370 | } 371 | 372 | return exists; 373 | } 374 | 375 | private static async Task ListScheduledCompetitionsWithLinq() 376 | { 377 | // Retrieve the titles for all the scheduled competitions that have more than 5 registered competitors 378 | var selectTitleQuery = client.CreateDocumentQuery(collectionUri, 379 | new FeedOptions() 380 | { 381 | EnableCrossPartitionQuery = true, 382 | MaxItemCount = 100, 383 | }) 384 | .Where(c => (c.NumberOfRegisteredCompetitors > 5) 385 | && (c.Status == CompetitionStatus.Scheduled)) 386 | .Select(c => c.Title) 387 | .AsDocumentQuery(); 388 | 389 | while (selectTitleQuery.HasMoreResults) 390 | { 391 | var selectTitleQueryResult = await selectTitleQuery.ExecuteNextAsync(); 392 | foreach (var title in selectTitleQueryResult) 393 | { 394 | Console.WriteLine(title); 395 | } 396 | } 397 | } 398 | 399 | private static async Task ListFinishedCompetitionsFirstWinner(GamingPlatform gamingPlatform, string zipCode) 400 | { 401 | // Retrieve the winner with the first position for all the finished competitions 402 | // that allowed the platform received as an argument 403 | // and located in the zipCode received as an argument. 404 | var winnersQuery = client.CreateDocumentQuery(collectionUri, 405 | new FeedOptions() 406 | { 407 | MaxItemCount = 100, 408 | }) 409 | .Where(c => (c.Location.ZipCode == zipCode) 410 | && (c.Status == CompetitionStatus.Finished) 411 | && (c.Platforms.Contains(gamingPlatform))) 412 | .Select(c => c.Winners[0]) 413 | .AsDocumentQuery(); 414 | 415 | while (winnersQuery.HasMoreResults) 416 | { 417 | var winnersQueryResult = await winnersQuery.ExecuteNextAsync(); 418 | foreach (var winner in winnersQueryResult) 419 | { 420 | Console.WriteLine($"Nickname: {winner.Player.NickName}, Score: {winner.Score}"); 421 | } 422 | } 423 | } 424 | 425 | private static async Task CreateAndQueryCompetitionsWithLinqAsync() 426 | { 427 | var database = await RetrieveOrCreateDatabaseAsync(); 428 | Console.WriteLine( 429 | $"The database {databaseId} is available for operations with the following AltLink: {database.AltLink}"); 430 | var collection = await CreateCollectionIfNotExistsAsync(); 431 | Console.WriteLine( 432 | $"The collection {collectionId} is available for operations with the following AltLink: {collection.AltLink}"); 433 | // Increase the provisioned throughput for the collection to 2000 RU/s 434 | var offer1 = await UpdateOfferForCollectionAsync(collection.SelfLink, 2000); 435 | Console.WriteLine( 436 | $"The collection {collectionId} has been re-configured with a provision throuhgput of 2000 RU/s"); 437 | // 438 | collectionUri = UriFactory.CreateDocumentCollectionUri(databaseId, collectionId); 439 | var competition3 = await GetCompetitionByTitleWithLinq("League of legends - San Diego 2018"); 440 | if (competition3 == null) 441 | { 442 | competition3 = await InsertCompetition3(); 443 | } 444 | 445 | bool isCompetition4Inserted = await DoesCompetitionWithTitleExistWithLinq("League of legends - San Diego 2019"); 446 | Competition competition4; 447 | if (isCompetition4Inserted) 448 | { 449 | competition4 = await GetCompetitionByTitleWithLinq("League of legends - San Diego 2019"); 450 | Console.WriteLine( 451 | $"The {competition4.Status} competition with the following title exists: {competition4.Title}"); 452 | } 453 | else 454 | { 455 | competition4 = await InsertCompetition4(); 456 | } 457 | 458 | var updatedCompetition4 = await UpdateScheduledCompetitionWithPlatforms("4", 459 | "92075", 460 | DateTime.UtcNow.AddDays(300), 461 | 10, 462 | new List 463 | { 464 | GamingPlatform.PC, GamingPlatform.XBox 465 | }); 466 | 467 | await ListScheduledCompetitionsWithLinq(); 468 | await ListFinishedCompetitionsFirstWinner(GamingPlatform.PS4, "90210"); 469 | await ListFinishedCompetitionsFirstWinner(GamingPlatform.Switch, "92075"); 470 | 471 | // Decrease the provisioned throughput for the collection to 1000 RU/s 472 | var offer2 = await UpdateOfferForCollectionAsync(collection.SelfLink, 1000); 473 | Console.WriteLine( 474 | $"The collection {collectionId} has been re-configured with a provision throuhgput of 1000 RU/s"); 475 | } 476 | } 477 | } 478 | -------------------------------------------------------------------------------- /Code files/Chapter06/learning_cosmos_db_06_01/SampleApp3/SampleApp1/SampleApp1.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | PreserveNewest 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Code files/Chapter06/learning_cosmos_db_06_01/SampleApp3/SampleApp1/Types/CompetitionStatus.cs: -------------------------------------------------------------------------------- 1 | namespace SampleApp1.Types 2 | { 3 | public enum CompetitionStatus 4 | { 5 | // The competition is scheduled and didn't happen yet 6 | Scheduled, 7 | // The competition is finished and has winners 8 | Finished, 9 | // The competition has been canceled 10 | Canceled 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Code files/Chapter06/learning_cosmos_db_06_01/SampleApp3/SampleApp1/Types/GamingPlatform.cs: -------------------------------------------------------------------------------- 1 | namespace SampleApp1.Types 2 | { 3 | using Newtonsoft.Json; 4 | using Newtonsoft.Json.Converters; 5 | 6 | [JsonConverter(typeof(StringEnumConverter))] 7 | public enum GamingPlatform 8 | { 9 | Switch, 10 | PC, 11 | PS4, 12 | XBox, 13 | iOS, 14 | Android 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Code files/Chapter06/learning_cosmos_db_06_01/SampleApp3/SampleApp1/configuration.json: -------------------------------------------------------------------------------- 1 | // Development configuration values 2 | { 3 | "CosmosDB": { 4 | // Replace with the endpoint URL for your Azure Cosmos DB account 5 | "endpointUrl": "https://example001.documents.azure.com:443/", 6 | // Replace with the read-write primary key for your Azure Cosmos DB account 7 | "authorizationKey": "Yf36lYUZvcv5WJjbcse4T0WqpgcbXIHkf74XKAhLNATJA7Dh6afsVZg7mMhKoKq42hyaXoOixQLTQj8WLCdETg==", 8 | // Replace with your desired database id 9 | "databaseId": "Competition", 10 | // Replace with your desired collection id 11 | "collectionId": "Competitions1" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /EPUB file/Guide to NoSQL with Azure Cosmos DB.epub: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Guide-to-NoSQL-with-Azure-Cosmos-DB/562c99197eb17b61be4f110966dc3b3984fad1f6/EPUB file/Guide to NoSQL with Azure Cosmos DB.epub -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Packt 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /MOBI file/Guide to NoSQL with Azure Cosmos DB.mobi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Guide-to-NoSQL-with-Azure-Cosmos-DB/562c99197eb17b61be4f110966dc3b3984fad1f6/MOBI file/Guide to NoSQL with Azure Cosmos DB.mobi -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ## $5 Tech Unlocked 2021! 5 | [Buy and download this Book for only $5 on PacktPub.com](https://www.packtpub.com/product/guide-to-nosql-with-azure-cosmos-db/9781789612899) 6 | ----- 7 | *If you have read this book, please leave a review on [Amazon.com](https://www.amazon.com/gp/product/1789612896). Potential readers can then use your unbiased opinion to help them make purchase decisions. Thank you. The $5 campaign runs from __December 15th 2020__ to __January 13th 2021.__* 8 | 9 | # Guide to NoSQL with Azure Cosmos DB 10 | 11 | Guide to NoSQL with Azure Cosmos DB 12 | 13 | This is the code repository for [Guide to NoSQL with Azure Cosmos DB](https://www.packtpub.com/big-data-and-business-intelligence/guide-nosql-azure-cosmos-db#utm_source=github&utm_medium=repository&utm_campaign=9781789612899), published by Packt. 14 | 15 | **A beginner’s guide to scalable cluster management and deployment** 16 | 17 | ## What is this book about? 18 | Cosmos DB is a NoSQL database service included in Azure that is continuously adding new features and has quickly become one of the most innovative services found in Azure, targeting mission-critical applications at a global scale. This book starts off by showing you the main features of Cosmos DB, their supported NoSQL data models and the foundations of its scalable and distributed architecture. You will learn to work with the latest available tools that simplify your tasks with Cosmos DB and reduce development costs, such as the Data Explorer in the Azure portal, Microsoft Azure Storage Explorer, and the Cosmos DB Emulator. 19 | 20 | This book covers the following exciting features: 21 | * Understand the supported NoSQL data models and the resource hierarchy 22 | * Learn the latest tools to work with Cosmos DB accounts and collections 23 | * Reduce your development costs by working with the Cosmos DB Emulator 24 | * Understand request units, automatic indexing, partitioning, and billing 25 | * Build an application with C#, Cosmos DB, .NET Core SDK, and the SQL API 26 | 27 | If you feel this book is for you, get your [copy](https://www.amazon.com/dp/1789137381) today! 28 | 29 | https://www.packtpub.com/ 31 | 32 | 33 | ## Instructions and Navigations 34 | All of the code is organized into folders. For example, Chapter02. 35 | 36 | The code will look like the following: 37 | ``` 38 | SELECT * 39 | FROM Videogames v 40 | WHERE v.id = '2' 41 | ``` 42 | 43 | **Following is what you need for this book:** 44 | This book is for DevOps and data engineers and administrators who work with large data clusters. You’ll also find this book useful if you have experience working with virtualization, databases, and platforms such as Hadoop and Spark. Some experience in database administration and design will help you get the most out of this book. 45 | 46 | With the following software and hardware list you can run all code files present in the book (Chapter 2-6). 47 | 48 | ### Software and Hardware List 49 | 50 | | Chapter | Software required | OS required | 51 | | -------- | ------------------------------------| -----------------------------------| 52 | | 2 |Azure subscription, Azure Storage Explorer | Windows, MacOS, and Linux (Any) | 53 | | 3 |Azure subscription | Windows, MacOS, and Linux (Any) | 54 | | 4 | Azure subscription, Visual Studio | Windows, MacOS, and Linux (Any) | 55 | | 5 | Azure subscription, Visual Studio | Windows, MacOS, and Linux (Any) | 56 | | 6 | Azure subscription, Visual Studio | Windows, MacOS, and Linux (Any) | 57 | 58 | 59 | 60 | We also provide a PDF file that has color images of the screenshots/diagrams used in this book. [Click here to download it](https://www.packtpub.com/sites/default/files/downloads/9781789612899_ColorImages.pdf). 61 | 62 | ### Related products 63 | * Seven NoSQL Databases in a Week [[Packt]](https://www.packtpub.com/big-data-and-business-intelligence/seven-nosql-databases-week#utm_source=github&utm_medium=repository&utm_campaign=9781787288867) [[Amazon]](https://www.amazon.com/dp/1787288862) 64 | 65 | * Learning Azure Cosmos DB [[Packt]](https://www.packtpub.com/big-data-and-business-intelligence/learning-azure-cosmos-db#utm_source=github&utm_medium=repository&utm_campaign=9781788476171) [[Amazon]](https://www.amazon.com/dp/1788476174) 66 | 67 | ## Get to Know the Authors 68 | **Gastón C. Hillar** is Italian and has been working with computers since he was 8 years old. 69 | Gaston has a bachelor's degree in computer science (graduated with honors) and an MBA. 70 | He is an independent consultant, a freelance author, and a speaker. 71 | He was a senior contributing editor at Dr. Dobb's Journal and has written more than a 72 | hundred articles on software development topics. He has received the prestigious Intel 73 | Black Belt Software Developer award eight times. 74 | He lives with his wife, Vanesa, and his two sons, Kevin and Brandon. 75 | 76 | **[Daron Yöndem](http://daron.me/)** has been a Microsoft Regional Director and a Microsoft MVP for 11 years. 77 | He is a regular speaker at international conferences, recently focusing on microservices, 78 | serverless, DevOps, and IoT. Daron currently works as a CTO at XOGO Inc, a SaaS provider building a decision 79 | signage platform. Feel free to reach out to him on Twitter [@daronyondem](https://twitter.com/daronyondem). 80 | 81 | 82 | ## Other books by the authors 83 | * [Learning Object-Oriented Programming](https://www.packtpub.com/application-development/learning-object-oriented-programming#utm_source=github&utm_medium=repository&utm_campaign=9781785289637) 84 | * [Internet of Things with Python](https://www.packtpub.com/hardware-and-creative/internet-things-python#utm_source=github&utm_medium=repository&utm_campaign=9781785881381) 85 | 86 | ### Suggestions and Feedback 87 | [Click here](https://docs.google.com/forms/d/e/1FAIpQLSdy7dATC6QmEL81FIUuymZ0Wy9vH1jHkvpY57OiMeKGqib_Ow/viewform) if you have any feedback or suggestions. 88 | ### Download a free PDF 89 | 90 | If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.
91 |

https://packt.link/free-ebook/9781789612899

--------------------------------------------------------------------------------