title: Best practices for debugging ASP.NET MVC Binding
body: <p>Can you give me any general advice on how to debug ASP.NET MVC Binding?</p>
  
  <p>When everything works as expected, ASP.NET MVC is great. But if something does not, like something doesn't bind for some unknown reason, I find it hard to trace down the problem and find myself spending hours tracking down a seemingly simple problem.</p>
  
  <p>Let's imagine you land in a controller method like this:</p>
  
  <pre><code>[HttpPost]
  public ActionResult ShipmentDetails(Order order)
  {
      //do stuff
  }
  </code></pre>
  
  <p>Let's further imagine that the Order class looks like this:</p>
  
  <pre><code>public class Order
  {
      public decimal Total {get; set;}
      public Customer Customer {get; set;}
  }
  
  public class Customer
  {
      public string Name {get; set;}
      public string Phone {get; set;}
  }
  </code></pre>
  
  <p>What are good places to start when <code>Order</code> in the controller method is not bound correctly? What are good places to start when only parts of the <code>Order</code> are bound correctly? </p>