title: returning and using multiple models in MVC
body: <p>I've been able to successfully return a model to a view and display the results in a strongly-typed fashion.</p>
  
  <p>I have never seen an example where multiple models get returned. How do I go about that?</p>
  
  <p>I suppose the controller would have something like this:</p>
  
  <pre><code>return View(lemondb.Messages.Where(p =&gt; p.user == tmp_username).ToList(), lemondb.Lemons.Where(p =&gt; p.acidity &gt;= 2).ToList());
  </code></pre>
  
  <p>Does MVC let you return multiple models like that?</p>
  
  <p>And then in the view I have this line at the top of the file:</p>
  
  <pre><code>@model IEnumerable&lt;ElkDogTrader.Models.Message&gt;
  </code></pre>
  
  <p>And I frequently make calls to "model" in the view.</p>
  
  <pre><code>@foreach (var item in Model)
  </code></pre>
  
  <p>If there were 2 models, how would I refer to them separately?</p>
  
  <p>Is this possible with multiple models, or is this why people use ViewBag and ViewData?</p>