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?
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.
For your information.
© 2024 OneMinuteCode. All rights reserved.