title: ViewBag vs Model, in MVC.NET
body: <p>This is more of a generic architectural question:</p>
  
  <p>I'm trying to decide if it's ok for my programmers to use "ViewBags" to pass data to views that already accept Models.</p>
  
  <p>My personal preference is to avoid ViewBags and build Robust Models containing all the data the view requires:</p>
  
  <p><strong>Approach 1:</strong></p>
  
  <pre><code>MODEL A: 
  - List of Employees
  - Nullable integer, indicating which item from the list is currently selected
  - string firstName (empty if index is null)
  - string lastname (empty if index is null)
  </code></pre>
  
  <p><strong>Approach 2:</strong></p>
  
  <pre><code>MODEL A: 
  - List of Employees
  
  ViewBag:
  - ViewBag.Index (indicating which item from the list is currently selected)
  - ViewBag.FirstName
  - ViewBag.LastName
  </code></pre>
  
  <p>Can anyone think of an argument why Approach2 would be better than approach 1?</p>
  
  <p>thanks for your input</p>