ASP.NET Core 2.0 Razor pages vs Full MVC Core

The SO question has arisen. Why is Razor Pages the recommended approach for creating a web interface in Asp.net Core 2.0? where Steve Smith kindly explained the advantages of using Razor Pages over full MVC in terms of file shortages.

I used Razor pages for a while and noticed that despite the Razor Page's simplicity advantage, it’s a bit more complicated when it comes to custom routing, folder structure and a complex presentation model (the page model seems cluttered).

So the questions are:

  • If there is anything else besides the simplicity of the page, which prefers Razor pages over controllers / views - in particular, I'm interested in the performance of two frameworks?
  • Is it possible to combine Razor pages and controllers / views at the same time?

I would also appreciate if some of the experienced guys shared their thoughts (pros and cons) about using the Razor pages to better understand this structure.

+4
source share
1 answer

So this is an old post, but I stumbled upon it, looking for something else. We recently launched a pretty decent size application using the Razor pages for MVC interfaces and controllers for APIs for client components. My experience was this:

, "" . , " " " " " ". , MVC, MVC . . , , .

MVC- , , , . MVC API , , ( " " ), MVC, , .

+4

Source: https://habr.com/ru/post/1691809/


All Articles