I am new to Entity Framework 4, and I am wondering, what's the best way to organize my data layer--the code that accesses EF4?
At this point, my data layer is set up like this:
DataStore class: Holds a reference to the EF4 ObjectContext, and contains methods to open, close, and persist the ObjectContext to storage.
Repository classes: One class for each entity, with methods to create, fetch, and delete entity objects.
Is there a better way to organize this functionality for EF4? I've looked for articles/blogs on the subject, but I'm not finding much. Any suggestions? Thanks for your help.