title: foreach statement cannot operate because does not contain a public definition for 'GetEnumerator'
body: <p>I build a solution has 4 layers </p>
  
  <ul>
  <li><p>1-One Solution (Data Access layer) has multi (DALs) from diffrent DBs.</p></li>
  <li><p>2-Data Store(access all DALs).  </p></li>
  <li><p>3-Business Layer BL(haslogicalmethods)  </p></li>
  <li><p>4-Presentation layer (MVC4).</p></li>
  </ul>
  
  <hr>
  
  <p>the problem is I want call a list search methods in DAL(Establishment) through BLL with Para Name to search it , and want to show the result in View in PL. 
  <strong>the EstController</strong></p>
  
  <pre><code>public ActionResult Index(string Name)
      {
          if (Name != null)
          {
              IList list = BLL.Establishment_Serv.getEstablishmentByName(Name.ToUpper());
              return View(list);
          }
          return View();
      }
  </code></pre>
  
  <p><strong>and Est/Index View</strong></p>
  
  <pre><code>    @using (Html.BeginForm("Index" ,"Est",FormMethod.Get))
  {
     &lt;p&gt;
          Find by name: @Html.TextBox("Name")  
          &lt;input type="submit" value="Search" /&gt;
      &lt;/p&gt;
  }
  &lt;table&gt;
  @foreach (var item in Model) 
  {
      &lt;tr&gt;
          &lt;td&gt;@Html.DisplayFor(modelItem =&gt; item.Id)&lt;/td&gt;
          &lt;td&gt;@Html.DisplayFor(modleItem =&gt; item.Name)&lt;/td&gt;
      &lt;/tr&gt;
  }
  &lt;/table&gt;
  </code></pre>
  
  <p>and I face an error in foreach statement.And if there a best approach to doing it HINT me please.</p>