问题
I have seen in NopCommerce project that there is a solution and there are multiple MVC projects within the solution.
I have some questions about it such as :
How is it possible to share a main layout, or use different layout on demand?
How is it possible to use Controllers/Models etc. in different MVC projects?
I would also like one main project and multiple sub MVC projects. How can this be done while sharing components?
Any ideas? pointers?
Note: Not interested in Areas.
回答1:
Yes it is. See: asp.net mvc put controllers into a separate project
I've done this myself and was able to use the controllers in a plug-in type architecture.
As for the models, they are just normal classes. They can be used in any project for any reason. There is nothing special about them.
来源:https://stackoverflow.com/questions/17489904/multiple-mvc-projects-in-a-single-solution