title: ASP.net MVC - One ViewModel per View or per Action?
body: <p>Is it a better idea to have a single ViewModel per view or one per controller action?</p>
  
  <p>Example:</p>
  
  <pre><code>public ProjectController : Controller
  {
      public ActionResult Edit(int id)
      {
          var project = ...;
  
          return View(new ProjectEditViewModel(project));
      }
  
      [HttpPost]
      public ActionResult Edit(ProjectEditViewModel model)
      {
      }
  
      **OR**
  
      [HttpPost]
      public ActionResult Edit(Project model)
      {
      }
  
      [HttpPost]
      public ActionResult Edit(ProjectEditPostViewModel model)
      {
      }
  }
  </code></pre>
  
  <p>Here are the three options, which is best?</p>
  
  <ol>
  <li>Use the same ViewModel for my POST/GET actions.</li>
  <li>Use a ViewModel for my GET action and my domain model for my POST action.</li>
  <li>Use a different ViewModel for GET and a different ViewModel for POST.</li>
  </ol>