title: ASP.NET MVC, EntityFramework, DBContext, Repository in a different Project
body: <p>I am currently working on an <strong>ASP.NET MVC 5</strong> project, and I am trying to polish the architecture of the project; make it as clean and easy for people to work on it in the future as possible.</p>
  
  <p>For starters I have moved my <strong>EntityFramework</strong> models (including IdentityUser and AccountViewModel) to a Class library project within the same solution. This is referenced by the main MVC project at the moment.</p>
  
  <p>However, I am now contemplating on creating a new Data Access Layer project which will hold the DbContext (or DbContexts, if I decide on using multiple DbContexts) as well as the data access layer. What is the best method to go on about doing this?</p>
  
  <p>This DAL project will reference the Model project, and the main MVC project will only reference the DAL project. </p>
  
  <p>After reading <a href="http://cockneycoder.wordpress.com/2013/04/07/why-entity-framework-renders-the-repository-pattern-obsolete/" rel="noreferrer">this article</a>! I was wondering if indeed the repository pattern is indeed obsolete when using EntityFramework.</p>
  
  <p>So my two main questions are:</p>
  
  <p>1) Whats the best way to pull out DAL into a separate project</p>
  
  <p>2) Whats the best way to access the database content using EF</p>