I have a 10+ year old ASP.NET MVC app that I'm getting ready to update/upgrade to ASP.NET Core 5. I'm trying to make a decision whether to stick with the MVC approach which would probably make the upgrade process easier OR switch to Razor pages. This is a pretty large app and the models used in the app come from a library project in the solution.
With that said, I have two questions:
- Some of the pages in the old app allow for lots of small edit scenarios and they have corresponding action methods in the controller. I understand that with razor pages, I don't use controllers. Instead, all the code is in code behind pages. Is it possible/advisable to have 20+ action methods in code behind pages of razor pages. This action methods would support those edit scenarios.
- As mentioned above, all the models used in the
MVCapp come from a library project. I'm pretty sure the answer to this question is YES but I want to make sure that I can still do the same with Razor pages and use my existing classes from the library project as the models for my razor pages.