title: ASP.NET 5 MVC 6 Generic Repository Pattern
body: <p>Been looking every where for a tutorial or something.</p>
  
  <p>I've been trying to implement my old generic repository pattern for MVC5 into a new MVC6 project.</p>
  
  <p>I set up 3 class library's <code>.Core</code>, <code>.Data</code> and <code>.Service</code>, However there's an issue with <code>IDBset</code>, seems my intellisense doesn't like it, I tried to add <code>System.Data</code> and Entity framework 6 but without any luck (cant find it...confusing).</p>
  
  <p>After roaming google I decided to ask here, is there a tutorial with the correct way or can someone throw up a very simple MVC6 Generic Repository pattern? I have a feeling the Old method of doing it may have changed, just cant seem to find any information other than the inbuilt DI.</p>
  
  <p>Code:
  my <code>IDbContext</code> interface</p>
  
  <pre><code>IDbSet&lt;TEntity&gt; Set&lt;TEntity&gt;() where TEntity : BaseEntity;
  </code></pre>
  
  <p>does not see <code>IDbSet</code>, this simply because of Entity Framework? I do have the References to it.</p>
  
  <p>Issue may be i cant find the using statment for entity framework.</p>
  
  <p>UPDATE:</p>
  
  <p>Using Entity framework 8.0.0 beta.  Change all IDbset references to DbSet.</p>
  
  <p>However in my generic repository where i use methods such as:</p>
  
  <pre><code>public virtual T GetById(object id)
  {
      return this.Entities.Find(id);
  }
  </code></pre>
  
  <p>"Find" isnt a method.  and i can no longer use "DbEntityValidationException" in  my catchs.</p>