Reputation: 16440
I want to structure my ASP.NET MVC 2 web application sensibly using Areas. The application consists of the two main parts Website
which is the default part and Dashboard
which administrates the site using a CMS. (Probably, more Areas will follow later on.)
How do I structure my project best? Should I ...
Dashboard
and put the stuff belonging to the Website
part into the main application folder or should IWebsite
and Dashboard
?Additionally, where should I place my Entity Data Model and the corresponding Repository classes that have to be accessed by both Areas?
Upvotes: 5
Views: 328
Reputation: 12711
I would go with option 1. Then your urls would look like this (if you use the default routing):
Website: http://mysite/ Dashboard: http://mysite/dashboard
If you change your mind later on, it's not too difficult to move your website into an area.
As for your "model", I wouldn't bother with the Models folders created by default for an MVC project. I would probably put this in its own project, give it a sensible namespace (mysite.domain or mysite.model) and reference it from the mvc app.
Upvotes: 4