title: How to display all records from the table ASP.NET MVC 3
body: <p>I have db with this table (TableToDo):</p>
  
  <p><a href="http://goo.gl/NlTEk" rel="nofollow">http://goo.gl/NlTEk</a></p>
  
  <p>I want display all records in TableToDo where <code>login==Joe</code>.</p>
  
  <p>All records I display so:
  Controller:</p>
  
  <pre><code>ASPNETDBEntities __db = new ASPNETDBEntities();
  public ActionResult Index(TableToDo obj)
  {
      var th = (from TableToDo in __db.TableToDo select TableToDo).ToList();
  
      return View(th);
  }
  </code></pre>
  
  <p>and strongly-typed View(List):</p>
  
  <pre><code>@foreach (var item in Model)
  {
      &lt;tr&gt;
          &lt;td&gt;
              @Html.DisplayFor(modelItem =&gt; item.text)
          &lt;/td&gt;
          &lt;td&gt;
              @Html.ActionLink("x", "Delete", new { id = item.id })
          &lt;/td&gt;
      &lt;/tr&gt;
  }
  </code></pre>
  
  <p>Please tell me how display all records in TableToDo where login==Joe?</p>