{"id":579,"date":"2017-04-24T10:00:49","date_gmt":"2017-04-24T08:00:49","guid":{"rendered":"https:\/\/qappdesign.com\/code\/?p=579"},"modified":"2017-11-15T07:52:52","modified_gmt":"2017-11-15T05:52:52","slug":"search-best-places-mongodb-linq-netcore","status":"publish","type":"post","link":"https:\/\/qappdesign.com\/code\/search-best-places-mongodb-linq-netcore\/","title":{"rendered":"How to search good places to travel (MongoDb LINQ &#038; .NET Core)"},"content":{"rendered":"<p>Let&#8217;s build a simple WebApi with .NET Core and MongoDb to query the details of different destinations around the globe. We&#8217;ll do the search with <strong>MongoDb LINQ<\/strong>, running different scenarios. <\/p>\n<p>For a brief introduction on how to build and test a full .NET CORE WebApi with MongoDB please check my earlier article: <a href=\"https:\/\/qappdesign.com\/code\/using-mongodb-with-net-core-webapi\/\">Using MongoDB .NET Driver with .NET Core WebAPI<\/a>.<\/p>\n<p>This article continues with 2 other parts:<\/p>\n<ul>\n<li><a href=\"https:\/\/qappdesign.com\/code\/paging-mongodb-avoid-poor-performance\/\" target=\"_blank\">Part 2 &#8211; Paging in MongoDB \u2013 How to actually avoid poor performance ?<\/a><\/li>\n<li><a href=\"https:\/\/qappdesign.com\/code\/mongodb-and-linq-how-to-aggregate-and-join-collections\/\" target=\"_blank\">Part 3 &#8211; MongoDb and LINQ: How to aggregate and join collections<\/a><\/li>\n<\/ul>\n<p>You could find the project on GitHub: <a href=\"https:\/\/github.com\/fpetru\/WebApiQueryMongoDb\" target=\"_blank\">github.com\/fpetru\/WebApiQueryMongoDb<\/a><\/p>\n<p>Within this article I will use two datasets:<\/p>\n<ul>\n<li><a href=\"https:\/\/en.wikivoyage.org\/wiki\/Main_Page\" target=\"_blank\">Wikivoyage<\/a> provides more details of the most traveler friendly museums, attractions, restaurants and hotels around the globe. The original dataset could be access from <a href=\"https:\/\/datahub.io\/dataset\/wikivoyage-listings-as-csv\" target=\"_blank\">the next url<\/a>.<\/li>\n<li>The second dataset comes from <a href=\"http:\/\/www.geonames.org\/\" target=\"_blank\">GeoNames<\/a>, which is a geographical database covering all countries. For demo purposes, I have selected only the cities with a population over 5000 inhabitants. <\/li>\n<\/ul>\n<p>Using these datasets it would be easier to run some sample queries, retrieving consistent amount of data.   <\/p>\n<h4>Topics covered<\/h4>\n<ul>\n<li>MongoDb &#8211; Installation and security setup<\/li>\n<li>MongoDB &#8211; use mongoimport tool<\/li>\n<li>Make a full ASP.NET WebApi project, connected async using MongoDB C# Driver v.2<\/li>\n<li>Run LINQ queries<\/li>\n<\/ul>\n<h4>To install<\/h4>\n<p>Here are all the things needed to be installed:<\/p>\n<ul>\n<li><a href=\"http:\/\/visualstudio.com\/free\" target=\"_blank\">Visual Studio Community 2017<\/a>, including .NET Core option<\/li>\n<li><a href=\"https:\/\/www.mongodb.com\/download-center#community\" target=\"_blank\">MongoDB<\/a> and <a href=\"https:\/\/robomongo.org\/\" target=\"_blank\">Robomongo<\/a><\/li>\n<\/ul>\n<h4>MongoDB configuration<\/h4>\n<p>Once you have installed <a href=\"https:\/\/www.mongodb.com\/download-center#community\" target=\"_blank\">MongoDB<\/a>, you would need to configure the access, as well as where the data is located.<\/p>\n<p>To do this, create a file locally, named <b>mongod.cfg<\/b>. This will include setting path to the data folder for MongoDB server, as well as to the MongoDB log file, initially without any authentication (last 2 lines being commented). Please <strong>update these local paths<\/strong>, with your local settings:<\/p>\n<pre class=\"lang:xml theme:stock\">\r\nsystemLog:\r\n  destination: file\r\n  path: \"C:\\\\tools\\\\mongodb\\\\db\\\\log\\\\mongo.log\"\r\n  logAppend: true\r\nstorage:\r\n  dbPath: \"C:\\\\tools\\\\mongodb\\\\db\\\\data\"\r\n\r\n#Once the admin user is created, remove the comments, and let the authorization be enabled\r\n#security:\r\n#  authorization: enabled\r\n<\/pre>\n<p>Run in <b>command prompt<\/b> next line. This will start the MongoDB server, pointing to the configuration file already created (in case the server is installed in a custom folder, please update first the command) <\/p>\n<pre class=\"lang:VS2012 Black\">\r\n\"C:\\Program Files\\MongoDB\\Server\\3.4\\bin\\mongod.exe\" --config C:\\Dev\\Data.Config\\mongod.cfg\r\n<\/pre>\n<p>Once the server is started (and you could see the details in the log file), run mongo.exe in <b>command prompt<\/b>. The next step is to add the <em>administrator<\/em> user to the database. Run MongoDB with the full path (ex: &#8220;C:\\Program Files\\MongoDB\\Server\\3.4\\bin\\mongo.exe&#8221;) and copy paste the next code in the console:<\/p>\n<pre class=\"lang:VS2012 Black\">\r\nuse admin\r\ndb.createUser(\r\n  {\r\n\tuser: \"admin\",\r\n\tpwd: \"abc123!\",\r\n\troles: [ { role: \"root\", db: \"admin\" } ]\r\n  }\r\n);\r\nexit;\r\n<\/pre>\n<p>Stop the server, uncomment the last 2 lines from <strong>mongod.cfg<\/strong> file and then restart the MongoDb server. <\/p>\n<h4>MongoImport &#8211; Initialize the database with large datasets<\/h4>\n<p>We will start with <a href=\"https:\/\/en.wikivoyage.org\/wiki\/Main_Page\" target=\"_blank\">Wikivoyage<\/a>. The dataset was originally available here (<a href=\"https:\/\/datahub.io\/dataset\/wikivoyage-listings-as-csv\" target=\"_blank\">link<\/a>). To be easier to import it, I have slightly transformed it (changed to tab delimited file, and applied a minimum data cleaning). The file is available in Github (<a href=\"https:\/\/github.com\/fpetru\/WebApiQueryMongoDb\/tree\/master\/Data\" target=\"_blank\">link<\/a>).<\/p>\n<p>The second dataset <a href=\"http:\/\/www.geonames.org\/\" target=\"_blank\">GeoNames<\/a> is available in the same Github folder (<a href=\"https:\/\/github.com\/fpetru\/WebApiQueryMongoDb\/tree\/master\/Data\" target=\"_blank\">link<\/a>).<\/p>\n<p>Running the script <strong>import.bat<\/strong> (found in the same folder as the datsets), will do the import of the data, creating also the a new database, called <em>TravelDb<\/em> and the associated indexes. Script is included here, but it would be better just to run the script file:<\/p>\n<pre class=\"lang:VS2012 Black\">\r\nmongoimport --db TravelDb ^\r\n            --collection WikiVoyage ^\r\n            --type tsv ^\r\n            --fieldFile enwikivoyage-fields.txt^\r\n            --file enwikivoyage-20150901-listings.result.tsv^\r\n            --columnsHaveTypes^\r\n            --username admin ^\r\n            --password abc123! ^\r\n            --authenticationDatabase admin ^\r\n            --numInsertionWorkers 4\r\n\r\nmongoimport --db TravelDb ^\r\n            --collection Cities ^\r\n            --type tsv ^\r\n            --fieldFile cities5000-fields.txt^\r\n            --file cities5000.txt ^\r\n            --columnsHaveTypes^\r\n            --username admin ^\r\n            --password abc123! ^\r\n            --authenticationDatabase admin ^\r\n            --numInsertionWorkers 4\r\n<\/pre>\n<p><strong>Fields files<\/strong> specifie the field names as well as their associated types. Using the option <strong>columnsHaveTypes<\/strong> we make the import with the types we need (e.g. int, double, string etc.).<\/p>\n<p>The result should look like this:<br \/>\n<img src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" data-src=\"https:\/\/qappdesign.com\/code\/wp-content\/uploads\/2017\/04\/mongoimport-columnsHaveTypes.jpg\" alt=\"\" class=\"lazyload \" \/><noscript><img src=\"https:\/\/i0.wp.com\/qappdesign.com\/code\/wp-content\/uploads\/2017\/04\/mongoimport-columnsHaveTypes.jpg?w=960&#038;ssl=1\" alt=\"\" data-recalc-dims=\"1\" \/><\/noscript><\/p>\n<h4>MongoDB &#8211; LINQ support<\/h4>\n<p>The .NET Core solution included here follows the same structure as in my earlier article &#8211; <a href=\"https:\/\/qappdesign.com\/code\/using-mongodb-with-net-core-webapi\/\">Using MongoDB .NET Driver with .NET Core WebAPI <\/a>. There, I have already presented a step by step guide on how to create an WebApi solution from scratch, connecting to MongoDB and implementing all the basic actions of a REST API.<\/p>\n<p>In comparison, here, the web controller will implement just one action (GET) &#8211; focusing mainly just on running different queries:<\/p>\n<pre>\r\n[NoCache]\r\n[HttpGet]\r\npublic Task<IEnumerable<TravelItem>> Get()\r\n{\r\n    return GetTravelItemsInternal();\r\n}\r\n\r\nprivate async Task<IEnumerable<TravelItem>> GetTravelItemsInternal()\r\n{\r\n    return await _travelItemRepository.GetTravelItems();\r\n}\r\n<\/pre>\n<p>In background, the query runs using LINQ syntax, and it returns first 500 records. <\/p>\n<pre>\r\npublic async Task<IEnumerable<TravelItem>> GetTravelItems()\r\n{\r\n    try\r\n    {\r\n        return await _context.TravelItems.Take(500).ToListAsync();\r\n    }\r\n    catch (Exception ex)\r\n    {\r\n        \/\/ log or manage the exception\r\n        throw ex;\r\n    }\r\n}\r\n<\/pre>\n<p>The query is rendered on the server, and we receive just the limited set of data. This is possible since we have <strong>IQueryable<\/strong> type interface, provided natively by MongoDB C# Driver.  <\/p>\n<pre>\r\n...\r\nusing MongoDB.Driver.Linq;\r\n...\r\npublic IMongoQueryable<TravelItem> TravelItems\r\n{\r\n    get\r\n    {\r\n        return _database.GetCollection<TravelItem>(\"WikiVoyage\").AsQueryable<TravelItem>();\r\n    }\r\n}\r\n<\/pre>\n<h4>How to find things to do in a specific city<\/h4>\n<p>Let&#8217;s assume we want to find the interesting things to do in a city. We either show all the items in the city, ordered by the type of action, or just select a specific action (e.g. buy, do, eat, drink etc.). <\/p>\n<pre>\r\npublic async Task<IEnumerable<TravelItem>> GetTravelItems(string cityName, string action)\r\n{\r\n    try\r\n    {\r\n        if (action != null)\r\n                    return await _context.TravelItems\r\n                        .Where(p => p.City == cityName && p.Action == action).ToListAsync();\r\n\r\n        return await _context.TravelItems.Where(p => p.City == cityName)\r\n                    .OrderBy(p => p.Action)\r\n                    .ToListAsync();\r\n    }\r\n    catch (Exception ex)\r\n    {\r\n        \/\/ log or manage the exception\r\n        throw ex;\r\n    }\r\n}\r\n<\/pre>\n<p>This method will be called by a GET function. Assuming that we want to search after interesting things to do in Paris (http:\/\/localhost:61612\/api\/travelquery\/Paris?doAction=do) we get interesting results, and one of them is the next:<\/p>\n<p><img src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" data-src=\"https:\/\/qappdesign.com\/code\/wp-content\/uploads\/2017\/04\/query-city-action-2.jpg\" alt=\"\" class=\"lazyload \" \/><noscript><img src=\"https:\/\/i0.wp.com\/qappdesign.com\/code\/wp-content\/uploads\/2017\/04\/query-city-action-2.jpg?w=960&#038;ssl=1\" alt=\"\" data-recalc-dims=\"1\" \/><\/noscript><\/p>\n<h4>Running faster the queries<\/h4>\n<p>One way to improve the speed of the queries is to apply an index. Searching within the collection after City and Action would recommend to add a simple index with these two fields.<\/p>\n<p>Executing the JavaScript file with mongo shell, will add an index on City, and then Action.<\/p>\n<pre>\r\ndb = db.getSiblingDB('TravelDb');\r\ndb.WikiVoyage.createIndex( { City: 1, Action: 1 } );\r\n<\/pre>\n<p>The speed of retrieval will increase from an average of 0.150 ms to about 0.001 ms.<\/p>\n<h4>Group items<\/h4>\n<p>What if we would like to see only headlines ? What types of actions are available for a specific city, without getting into details ?<\/p>\n<p>A sample query, grouping by <em>City<\/em> and <em>Action<\/em> fields would be:<\/p>\n<pre>\r\nawait _context.TravelItems\r\n            .GroupBy(grp => new { grp.City, grp.Action })\r\n            .Select(g => new { g.Key.City, g.Key.Action }).ToListAsync();\r\n<\/pre>\n<h4>To continue<\/h4>\n<p>I would create a second part of this article, adding pagination support as well as aggregation enhancements brought by newer MongoDB versions, taking into consideration also the second dataset. Perhaps you knew these, maybe you learned a few things. Would you like to see something more covered ?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Let&#8217;s build a simple WebApi with .NET Core and MongoDb to query the details of different destinations around the globe. We&#8217;ll do the search with MongoDb LINQ, running different scenarios. For a brief introduction on how to build and test a full .NET CORE WebApi with MongoDB please check my earlier article: Using MongoDB .NET Driver with .NET Core WebAPI. This article continues with 2 other parts: Part 2 &#8211; Paging in MongoDB \u2013 How to actually avoid poor performance ? Part 3 &#8211; MongoDb and LINQ: How to aggregate and join collections You could find the project on GitHub: github.com\/fpetru\/WebApiQueryMongoDb Within this article I will use two datasets: Wikivoyage provides more details of the most traveler friendly museums, attractions, restaurants and hotels around the globe. The original dataset could be access from the next url. The second dataset comes from GeoNames, which is a geographical database covering all countries. For demo purposes, I have selected only the cities with a population over 5000 inhabitants. Using these datasets it would be easier to run some sample queries, retrieving consistent amount of data. Topics covered MongoDb &#8211; Installation and security setup MongoDB &#8211; use mongoimport tool Make a full ASP.NET WebApi [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":628,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"image","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[13,6,7,12,8],"tags":[22,3,25,24],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v18.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to search good places to travel (MongoDb LINQ &amp; .NET Core) - Cloud, Data and Integrations<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/qappdesign.com\/code\/search-best-places-mongodb-linq-netcore\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to search good places to travel (MongoDb LINQ &amp; .NET Core) - Cloud, Data and Integrations\" \/>\n<meta property=\"og:description\" content=\"Let&#8217;s build a simple WebApi with .NET Core and MongoDb to query the details of different destinations around the globe. We&#8217;ll do the search with MongoDb LINQ, running different scenarios. For a brief introduction on how to build and test a full .NET CORE WebApi with MongoDB please check my earlier article: Using MongoDB .NET Driver with .NET Core WebAPI. This article continues with 2 other parts: Part 2 &#8211; Paging in MongoDB \u2013 How to actually avoid poor performance ? Part 3 &#8211; MongoDb and LINQ: How to aggregate and join collections You could find the project on GitHub: github.com\/fpetru\/WebApiQueryMongoDb Within this article I will use two datasets: Wikivoyage provides more details of the most traveler friendly museums, attractions, restaurants and hotels around the globe. The original dataset could be access from the next url. The second dataset comes from GeoNames, which is a geographical database covering all countries. For demo purposes, I have selected only the cities with a population over 5000 inhabitants. Using these datasets it would be easier to run some sample queries, retrieving consistent amount of data. Topics covered MongoDb &#8211; Installation and security setup MongoDB &#8211; use mongoimport tool Make a full ASP.NET WebApi [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/qappdesign.com\/code\/search-best-places-mongodb-linq-netcore\/\" \/>\n<meta property=\"og:site_name\" content=\"Cloud, Data and Integrations\" \/>\n<meta property=\"article:published_time\" content=\"2017-04-24T08:00:49+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-11-15T05:52:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/qappdesign.com\/code\/wp-content\/uploads\/2017\/04\/WikiVoyage-Paris.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"949\" \/>\n\t<meta property=\"og:image:height\" content=\"160\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary\" \/>\n<meta name=\"twitter:creator\" content=\"@qappdesign\" \/>\n<meta name=\"twitter:site\" content=\"@QAppDesign\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Petru Faurescu\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/qappdesign.com\/code\/#website\",\"url\":\"https:\/\/qappdesign.com\/code\/\",\"name\":\"QualityAppDesign\",\"description\":\"with Petru Faurescu\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/qappdesign.com\/code\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/qappdesign.com\/code\/search-best-places-mongodb-linq-netcore\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/i0.wp.com\/qappdesign.com\/code\/wp-content\/uploads\/2017\/04\/WikiVoyage-Paris.jpg?fit=949%2C160&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/qappdesign.com\/code\/wp-content\/uploads\/2017\/04\/WikiVoyage-Paris.jpg?fit=949%2C160&ssl=1\",\"width\":949,\"height\":160},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/qappdesign.com\/code\/search-best-places-mongodb-linq-netcore\/#webpage\",\"url\":\"https:\/\/qappdesign.com\/code\/search-best-places-mongodb-linq-netcore\/\",\"name\":\"How to search good places to travel (MongoDb LINQ & .NET Core) - Cloud, Data and Integrations\",\"isPartOf\":{\"@id\":\"https:\/\/qappdesign.com\/code\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/qappdesign.com\/code\/search-best-places-mongodb-linq-netcore\/#primaryimage\"},\"datePublished\":\"2017-04-24T08:00:49+00:00\",\"dateModified\":\"2017-11-15T05:52:52+00:00\",\"author\":{\"@id\":\"https:\/\/qappdesign.com\/code\/#\/schema\/person\/54db90dc6fe846cfd4c5a9544d93b75a\"},\"breadcrumb\":{\"@id\":\"https:\/\/qappdesign.com\/code\/search-best-places-mongodb-linq-netcore\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/qappdesign.com\/code\/search-best-places-mongodb-linq-netcore\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/qappdesign.com\/code\/search-best-places-mongodb-linq-netcore\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/qappdesign.com\/code\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to search good places to travel (MongoDb LINQ &#038; .NET Core)\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/qappdesign.com\/code\/#\/schema\/person\/54db90dc6fe846cfd4c5a9544d93b75a\",\"name\":\"Petru Faurescu\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/qappdesign.com\/code\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/84fb359a4e3d583dbea5a34bd5566956?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/84fb359a4e3d583dbea5a34bd5566956?s=96&d=mm&r=g\",\"caption\":\"Petru Faurescu\"},\"description\":\"Product lead, software developer &amp; architect\",\"sameAs\":[\"https:\/\/qappdesign.com\/code\",\"https:\/\/www.linkedin.com\/in\/petrufaurescu\/\",\"https:\/\/twitter.com\/@qappdesign\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to search good places to travel (MongoDb LINQ & .NET Core) - Cloud, Data and Integrations","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/qappdesign.com\/code\/search-best-places-mongodb-linq-netcore\/","og_locale":"en_US","og_type":"article","og_title":"How to search good places to travel (MongoDb LINQ & .NET Core) - Cloud, Data and Integrations","og_description":"Let&#8217;s build a simple WebApi with .NET Core and MongoDb to query the details of different destinations around the globe. We&#8217;ll do the search with MongoDb LINQ, running different scenarios. For a brief introduction on how to build and test a full .NET CORE WebApi with MongoDB please check my earlier article: Using MongoDB .NET Driver with .NET Core WebAPI. This article continues with 2 other parts: Part 2 &#8211; Paging in MongoDB \u2013 How to actually avoid poor performance ? Part 3 &#8211; MongoDb and LINQ: How to aggregate and join collections You could find the project on GitHub: github.com\/fpetru\/WebApiQueryMongoDb Within this article I will use two datasets: Wikivoyage provides more details of the most traveler friendly museums, attractions, restaurants and hotels around the globe. The original dataset could be access from the next url. The second dataset comes from GeoNames, which is a geographical database covering all countries. For demo purposes, I have selected only the cities with a population over 5000 inhabitants. Using these datasets it would be easier to run some sample queries, retrieving consistent amount of data. Topics covered MongoDb &#8211; Installation and security setup MongoDB &#8211; use mongoimport tool Make a full ASP.NET WebApi [&hellip;]","og_url":"https:\/\/qappdesign.com\/code\/search-best-places-mongodb-linq-netcore\/","og_site_name":"Cloud, Data and Integrations","article_published_time":"2017-04-24T08:00:49+00:00","article_modified_time":"2017-11-15T05:52:52+00:00","og_image":[{"width":949,"height":160,"url":"https:\/\/qappdesign.com\/code\/wp-content\/uploads\/2017\/04\/WikiVoyage-Paris.jpg","type":"image\/jpeg"}],"twitter_card":"summary","twitter_creator":"@qappdesign","twitter_site":"@QAppDesign","twitter_misc":{"Written by":"Petru Faurescu","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/qappdesign.com\/code\/#website","url":"https:\/\/qappdesign.com\/code\/","name":"QualityAppDesign","description":"with Petru Faurescu","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/qappdesign.com\/code\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"ImageObject","@id":"https:\/\/qappdesign.com\/code\/search-best-places-mongodb-linq-netcore\/#primaryimage","inLanguage":"en-US","url":"https:\/\/i0.wp.com\/qappdesign.com\/code\/wp-content\/uploads\/2017\/04\/WikiVoyage-Paris.jpg?fit=949%2C160&ssl=1","contentUrl":"https:\/\/i0.wp.com\/qappdesign.com\/code\/wp-content\/uploads\/2017\/04\/WikiVoyage-Paris.jpg?fit=949%2C160&ssl=1","width":949,"height":160},{"@type":"WebPage","@id":"https:\/\/qappdesign.com\/code\/search-best-places-mongodb-linq-netcore\/#webpage","url":"https:\/\/qappdesign.com\/code\/search-best-places-mongodb-linq-netcore\/","name":"How to search good places to travel (MongoDb LINQ & .NET Core) - Cloud, Data and Integrations","isPartOf":{"@id":"https:\/\/qappdesign.com\/code\/#website"},"primaryImageOfPage":{"@id":"https:\/\/qappdesign.com\/code\/search-best-places-mongodb-linq-netcore\/#primaryimage"},"datePublished":"2017-04-24T08:00:49+00:00","dateModified":"2017-11-15T05:52:52+00:00","author":{"@id":"https:\/\/qappdesign.com\/code\/#\/schema\/person\/54db90dc6fe846cfd4c5a9544d93b75a"},"breadcrumb":{"@id":"https:\/\/qappdesign.com\/code\/search-best-places-mongodb-linq-netcore\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/qappdesign.com\/code\/search-best-places-mongodb-linq-netcore\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/qappdesign.com\/code\/search-best-places-mongodb-linq-netcore\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/qappdesign.com\/code\/"},{"@type":"ListItem","position":2,"name":"How to search good places to travel (MongoDb LINQ &#038; .NET Core)"}]},{"@type":"Person","@id":"https:\/\/qappdesign.com\/code\/#\/schema\/person\/54db90dc6fe846cfd4c5a9544d93b75a","name":"Petru Faurescu","image":{"@type":"ImageObject","@id":"https:\/\/qappdesign.com\/code\/#personlogo","inLanguage":"en-US","url":"https:\/\/secure.gravatar.com\/avatar\/84fb359a4e3d583dbea5a34bd5566956?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/84fb359a4e3d583dbea5a34bd5566956?s=96&d=mm&r=g","caption":"Petru Faurescu"},"description":"Product lead, software developer &amp; architect","sameAs":["https:\/\/qappdesign.com\/code","https:\/\/www.linkedin.com\/in\/petrufaurescu\/","https:\/\/twitter.com\/@qappdesign"]}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/qappdesign.com\/code\/wp-content\/uploads\/2017\/04\/WikiVoyage-Paris.jpg?fit=949%2C160&ssl=1","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p82xvM-9l","_links":{"self":[{"href":"https:\/\/qappdesign.com\/code\/wp-json\/wp\/v2\/posts\/579"}],"collection":[{"href":"https:\/\/qappdesign.com\/code\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qappdesign.com\/code\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/qappdesign.com\/code\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/qappdesign.com\/code\/wp-json\/wp\/v2\/comments?post=579"}],"version-history":[{"count":49,"href":"https:\/\/qappdesign.com\/code\/wp-json\/wp\/v2\/posts\/579\/revisions"}],"predecessor-version":[{"id":812,"href":"https:\/\/qappdesign.com\/code\/wp-json\/wp\/v2\/posts\/579\/revisions\/812"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/qappdesign.com\/code\/wp-json\/wp\/v2\/media\/628"}],"wp:attachment":[{"href":"https:\/\/qappdesign.com\/code\/wp-json\/wp\/v2\/media?parent=579"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qappdesign.com\/code\/wp-json\/wp\/v2\/categories?post=579"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qappdesign.com\/code\/wp-json\/wp\/v2\/tags?post=579"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}