title: How to handle null {id} on route?
body: <p>What if a user hits my site with <a href="http://www.mysite.com/Quote/Edit" rel="noreferrer">http://www.mysite.com/Quote/Edit</a> rather than <a href="http://www.mysite.com/Quote/Edit/1000" rel="noreferrer">http://www.mysite.com/Quote/Edit/1000</a>  In other words, they do not specify a value for {id}. If they do not, I want to display a nice "Not Found" page, since they did not give an ID. I currentl handle this by accepting a nullable int as the parameter in the Controller Action and it works fine. However, I'm curious if there a more standard MVC framework way of handling this, rather than the code I presently use (see below).  Is a smoother way to handle this, or is this pretty mush the right way to do it?</p>
  
  <pre><code>    [HttpGet]
      public ActionResult Edit(int? id)
      {
          if (id == null)
              return View("QuoteNotFound");
  
          int quoteId = (int)id;
  
          var viewModel = new QuoteViewModel(this.UserId);
          viewModel.LoadQuote(quoteId);
          if (viewModel.QuoteNo &gt; 0)
          {
              return View("Create", viewModel.Quote.Entity);
          }
          else
              return View("QuoteNotFound");
      }
  </code></pre>