title: Only one 'model' statement is allowed in a file
body: <p>I try to list data provided models data sent from a SearchController. But, I got this error, that I can't find how to fix it.</p>
  
  <blockquote>
    <p>Only one 'model' statement is allowed in a file.</p>
  </blockquote>
  
  <p>Here is the code causes the error :</p>
  
  <pre><code>@if (ViewBag.Type == "nomPoste")
  {
      @model IEnumerable&lt;Monitoring.Models.PosteModel&gt;
  
      if (Model != null)
      {
          foreach (var item in Model)
          {
              //...
          }
      }
      if (Model == null)
      {
          //...
      }
  }
  
  @if (ViewBag.Type == "nomApplication")
  {
      @model IEnumerable&lt;Monitoring.Models.AppMetierModel&gt;
  
      if (Model != null)
      {
          foreach (var item in Model)
          {
              //...
          }
      }
      if (Model == null)
      {
          //...
      }
  }
  </code></pre>
  
  <p>How do I to fix it, please ?</p>