Benefits and Disadvantages of Razor Page and MVC

Asked 2 years ago, Updated 2 years ago, 146 views


for ASP.NET Core ·Razor Pages application
·MVC application
There are two types, but how should I use them separately?
What are the advantages and disadvantages of each application?

.net asp.net asp.net-core .net-core

2022-09-30 21:37

1 Answers

I created MVC in .NET and Razor Page in .NET Core.I think it doesn't matter which way you use it from the perspective of using it differently.
In MVC, View and Model are independent, but if you put a search box in View, you will definitely want a model related to View only.It's called ViewModel, but it's troublesome if you don't rule out the difference between this and the model used in DnContext.
The Razor Page has a PageModel derivative class, so the Model folder has only the Model to be used in DbContext, which looks great.So I'm going to do this.

  • Razor Page
  • to create from scratch
  • If you want to take over the current MVC project, MVC

For your information.


2022-09-30 21:37

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.