I’ve seen in several examples, each module contains a folder called Model, and all of them are independent. I mean the module A has no the same model classes than Module B.
I’ve implemented my database, and using Entity framework, but all my modules need to use several classes.
Is it OK to create a dll called data (where contains the entities) and import to each module?
I think absolutely OK. So, you can have modules:
YourApplication(just Shell bootstrapper)YourApplication.Infrastructue(all shared interfaces, enums etc.)YourApplication.Data(orYourApplication.DAL) – project with Entity Framework’s entitiesYourApplication.ModuleA(with references to*.Infrastructureand*.Data)YourApplication.ModuleB(with references to*.Infrastructureand*.Data)Prism recommends that
ModuleAshould not know aboutModuleB, not that they should not use the same shared projects (Prism guide containsYourApplication.Infrastructureitself, am I right? 🙂 )But in general – it’s very probably, that you will need add Models to your modules (even if you have Entity Framework layer), because very often business models and database models aren’t the same. But if you can use just database model – it will be great.