title: DbContext -> DbSet -> Where clause is missing (Entity Framework 6)
body: <p>I've read some tutorials with entity framework 6...</p>
  
  <p>The basics are easy.</p>
  
  <pre><code>using (var context = new MyContext())
  {
      User u = context.Users.Find(1);
  }
  </code></pre>
  
  <p>But how to use "Where" or something else on the "DbSet" with the users?</p>
  
  <pre><code>public class MyContext : DbContext
  {
      public MyContext()
          : base("name=MyContext")
      {
          //this.Database.Log = Console.Write;
      }
  
      public virtual DbSet&lt;User&gt; Users { get; set; }
  }
  </code></pre>
  
  <p>Users</p>
  
  <pre><code>[Table("User")]
  public class User : Base
  {
      public Guid Id { get; set; }
  
      [StringLength(100)]
      public string Username { get; set; }
  }
  </code></pre>
  
  <p>And thats the problem which doesnt work.</p>
  
  <pre><code>string username = "Test";
  using (var context = new MyContext())
  {
      User u = from user in context.Users where user.Username == username select user;
  }
  </code></pre>
  
  <p><strong>Error:</strong> There was no implementation of the query pattern for source type 'DbSet'. 'Where' is not found. Maybe a reference or a using directive for 'System.Link' is missing.</p>
  
  <p>If i try to autocomplete the methods there are none.</p>
  
  <p><img src="https://i.stack.imgur.com/NVSxK.png" alt="VS2013"></p>
  
  <p><strong>Why it doesnt works? :(</strong></p>
  
  <p>// Edit:
  Adding System.Linq to the top of the file changes the functions of the problem above so that i havent a problem anymore.</p>
  
  <p>But why the <code>where</code> is wrong now?</p>
  
  <pre><code>The type "System.Linq.IQueryable&lt;User&gt;" cant converted into "User" explicit. There already exists an explicit conversion. (Possibly a cast is missing)
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/w5pM2.png" alt="above doesnt work, bottom works"></p>