title: Selecting rows in a DBSet with Entity Framework
body: <p>I'm trying to get rows based on a <code>WHERE</code> clause in a <code>DbSet</code> object. I have this: </p>
  
  <pre><code>dbContext.Workers
  </code></pre>
  
  <p>I can get a list like this:</p>
  
  <pre><code>workers = m.Workers.Where(w =&gt; w.BranchId == curUser.BranchId).ToList&lt;Worker&gt;();
  </code></pre>
  
  <p>But as you can see, it returns a <code>List&lt;Worker&gt;</code> and I can't use methods like <code>workers.Find(WorkerId)</code> with it.</p>
  
  <p>Basically, I'm trying to return a <code>DBSet</code> based on some filter I mean I want to use LINQ on a DBSet class. I want this because I need to use <code>workers.Find(WorkerId)</code> also maybe I will need to update this model. So, I will get a list based on where clause, I will change some values and will use <code>dbContext.SaveChanges()</code>. Is that possible?</p>
  
  <p>Thanks</p>