We currently have 1 giant EDMX for our corporate database. It, along with all of the generated POCOs, are in a separate project (we'll call it the EDMX project) which we pull in to any solution that uses the main database. In other words, any new application we develop uses this same EDMX project. Naturally, the EDMX project requires a reference to Entity Framework. But so do the main projects for each application. Thus, a given solution has 2 separate Entity Framework references - which could end up being completely different versions.
I inherited this setup and now have the opportunity to make some big changes. I have a suspicion we shouldn't be using this one EDMX for multiple solutions, but am not 100% sure.
- Could having 2 different versions of Entity Framework in a given solution cause issues? It seems like it would, and we certainly do not want to constrain our newer applications to an old version of EF to work with the EDMX project which in turn works with older solutions.
- Are there any other reasons this would be bad?
Note: I have read similar questions about using 1 EDMX within the same solution (vs. splitting it up by schema, etc.), but my question is different because I am talking about using 1 EDMX for all solutions.
EDIT 10/16/14: So I pretty much have my first question answered. At least between Entity Framework 5 and Entity Framework 6, it does indeed cause issues. When my EDMX project has EF5 installed, and I upgrade my main project to EF6, many of my LINQ queries (inside the main project, referencing the generated-POCO classes inside the EDMX project) break. As I understand it, this has something to do with namespace changes. If there is a workaround to make the two versions work together, I haven't found it.
My 2nd question still needs answered, however. Are there any other reasons it'd be bad to do, besides conflicting versions of Entity Framework? From a design perspective, does having 1 EDMX make sense?
Pros could be ease of updating (if a database table used by multiple projects changes, there is 1 place to update it). The obvious con is new projects being constrained to an old EF version until all other projects got updated. Any other issues that would crop up? Really just looking for some direction.
EDIT 10/17/14 I've accepted an answer but comments about your/your company's usage of the EDMX would still be helpful/upvoted. The more perspective the better.