title: Creating dynamic routes in mvc5
body: <p>Based on my SEO team's recommendation i am trying to generate SEO friendly urls. For some static pages i have done that easily using RouteCollection.MapRoute() like - </p>
  
  <pre><code>//Home/Solutions
  routes.MapRoute("Solutions", "Solutions", new { controller = "Home", action = "Solutions" }, new[] { "MyAuction.Controllers" });
  
  //Home/SolutionOfferings
  routes.MapRoute("Offerings", "Offerings", new { controller = "Home", action = "SolutionOfferings" }, new[] { "MyAuction.Controllers" });
  
  //Home/Pricing
  routes.MapRoute("Pricing", "Pricing", new { controller = "Home", action = "Pricing" }, new[] { "MyAuction.Controllers" });
  </code></pre>
  
  <p>I was then trying to generate SEO friendly routes for my dynamic routes. For example there are several auctions scheduled for a day which contains hundreds of vehicles scheduled within the auction. To show details of that scheduled vehicle within the auction the actual URL is somewhat -</p>
  
  <p><code>http://example.com/Auction/VehicleDetails?AuctionId=42&amp;VehicleId=101</code>
  Please note that <code>VehicleId</code> represents the Identity within <code>AuctionVehicles</code> table which also contains other details of the vehicle like <code>Make</code>, <code>Model</code>, <code>Year</code> and <code>VIN</code> etc.</p>
  
  <p>What i want to achieve is to generate a dynamic URL like - </p>
  
  <p><a href="http://example.com/42/honda-civic-2010-123456" rel="nofollow noreferrer">http://example.com/42/honda-civic-2010-123456</a></p>
  
  <p>where 42 is the auction id while honda is the make, civic is the model, 2010 is the year and 123456 is the last 6 digits of the VIN number.</p>
  
  <p>Not sure how to achieve this. </p>
  
  <p>I tried using this link - 
  <a href="https://stackoverflow.com/questions/16026441/dynamic-routes-from-database-for-asp-net-mvc-cms">Dynamic Routes from database for ASP.NET MVC CMS</a></p>
  
  <p>Any help would be greatly appreciated.</p>