Last post Oct 14, 2017 10:08 AM by Dmitry Sikorsky
Oct 14, 2017 12:07 AM|MistahK26|LINK
I need some guidance on choosing between MVC and Razor Pages for a small business application.
I read a thread on reddit (link below) about using razor pages. There was quite a bit of disdain for razor pages; the comments were opinionated and unhelpful. I like the organizational benefits to Razor Pages, and would prefer to use it unless there is a
clear reason why I shouldn't.
Currently, I don't see why Razor Pages wouldn't be able to replace controllers for the following reasons...
It still seems like there is still a pretty good separation between the model, view, and business logic when using Razor Pages. If anyone has a concrete example as to why Razor Pages wouldn't work for this use case, please let me know.
Oct 14, 2017 10:08 AM|Dmitry Sikorsky|LINK
As I think, there is no situation when you really must use only a razor page. This is a matter of personal preference. I think it is good idea to try using them is displaying pages where you have to display information, like different reports or statistics.
And you can continue using controllers to manipulate data (like CRUD operations, lists with ability to add items etc). So from my point of view, RP are good to be used when there are a lot of information to display, and when the set of this information changes
all the time, so you can easily add or remove pages.