Mike
Mike

Reputation: 33

Asp.net MVC 3 and NHibernate Architecture

I setup a solution with the following structure:

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

Answers (1)

James Kovacs
James Kovacs

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

Related Questions