We are working on suite of applications in our company. Each applications have different business logic but share some structures. For example one application is for "IT services" and another one is for "package handling system" among different buildings of the company. We want to create each application with separate asp.net mvc projects (Entity framework Code-First). But the problem is that all of the applications have some similar entities. For example all of them have People
, Buildings
and Floors
Entities in their dbContext
. and also have some other tables that have relations to this similar tables
What is the best approach to designing this applications?
- Create a single database for all of the applications? what is side-effects?
- Create separate Database for each application and duplicate the similar Tables? (currently we working on this but we should write some SQL server jobs to always sync this tables. so I don't think its a good approach)
- Create a database for shared tables and another databases for each application. This will cause to lose relations between tables and also produces multi-Context applications (I prefer this but I read that with Code-First EF and linq, it is not possible to query cross multiple contexts)
- or something else ?