Should you reuse an Entity Framework EDMX between multiple solutions?

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.

Questions

  1. 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.
  2. 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.

It depends.

The main thing I would focus on is “don’t repeat yourself”. If you have a bunch of applications using the same entities, it doesn’t make sense to spend a bunch of time and effort making and then maintaining the same thing over and over again. Worse, it can become a headache to keep all of them correct and in sync.

On the other hand, if you really have a bunch of different schemas that just happen to live in the same database (and don’t interact), then it can make sense to have multiple independent EDMX files.

I have seen both ways, and they worked well enough in their environments. But given the Entity Framework’s difficulties in playing nice with others, I would err towards putting all of a database into a single project, as it’s less work to “just use part of it” than “make it work with that other stuff too” should my guess be wrong about future usage.

1

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật