Reputation: 33
I setup a solution with the following structure:
Project.Core
Domain
Mappings
Repositories
Project.Web
Views
Models
Contollers
Project.Web is the asp.net MVC 3 template. I was wondering what would be the best architecture would be if i'm using MVC and NHibernate and I wont other web applications to utilize the Project.Core library.
It seems like the Domain and the Models are pretty much the same thing?
If I want to use the Domain's instead of the model how would I modify the asp.net mvc3 project to accept this?
Thanks
Upvotes: 3
Views: 1308
Reputation: 11651
Yes, your domain objects in Project.Core are the same as your models. Just delete your Models folder in Project.Web and create a project reference from Project.Web to Project.Core. Since Project.Core is simply a Class Library project and contains your domain model, repositories, and mappings*, you can use these classes from Project.Web, a console app, web service, or any other code.
Upvotes: 1