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.
It shouldn't! That's why it's designed in a modular way. In most web applications out there, we version and deploy all these assemblies (Web, BLL and DAL) together. So, separating a project into 3 projects does not add any values.
-Model View Controller (MVC): a single model is mapped to multiple views: the different synchronized channels. Multiple controllers act on and transform the underlying model by interacting via one or more views.
You can add support for Pages to any ASP.NET Core MVC app by simply adding a Pages folder and adding Razor Pages files to this folder. Razor Pages use the folder structure as a convention for routing requests.
In fact, in ASP.NET MVC, there are three distinct types of model: the domain model, view model and input model.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With