We are developing the application with MVC and Repository Pattern. Currently we are using EF as an ORM. But Later we need to change the ORM to nHibernate. Any Idea on the architecture.
Currently I plan the architecture as
- Contracts: Model/Entities/Repository-Interface/Service-Interface
- DataLayer(Reference Contracts) Repository Implementation
- Service Layer(Reference contracts, DataLayer) Service Implementation
- Web (Reference Contracts,ServiceLayer) Implement Dependency injection (Unity)
Here the DataLayer is tightly coupled. So I need to break and make like this
- Contracts: Model/Repository-Interface/Service-Interface
- DataLayer(Reference Contracts) Entities/Repository Implementation (which will return Models)
- Service Layer(Reference contracts, DataLayer) Service Implementation
- Web (Reference Contracts,ServiceLayer) Implement Dependency injection (Unity)
Whether above will work if we change the ORM, or it will have major impact.