title: Entity Framework 4 DB-First Dependency Injection?
body: <p>I prefer creating my own DB, setting up indexes, unique constraints etc. Generating the domain model from the database is a cinch with the edmx Entity Framework designer.</p>
  
  <p>Now I'm interested in setting up some repositories an using Dependency Injection. I've looked at some articles and posts on StackOverflow and seem to focus on the code-first approach. It is pretty slick how you can create a generic repository to handle the CRUD and use Dependency Injection to choose the implementation details.</p>
  
  <p>I'd like to do the same thing, but it seems that the domain model generated by the edmx process inherits concrete classes instead of implementing interfaces (ObjectContext/ObjectSet as opposed to IObjectContext/IObjectSet).</p>
  
  <p>Does anyone have any resources they can point me to on how I might use Dependency Injection when utilizing the db-first/code generation technique?</p>