Pages
- M
- Model
- defines Data
- VC(or VM)
- View and Controller(or Model)
- defines UI
- defines Action
Code
- Models\HelloMessage.cs
- Views\Index.cshtml
- Views\Index.cshtml.cs
- Views_ViewImports.cshtml
- Startup.cs
Differnce with MVC
- Index.cshtml
- Razor Pages doesn’t have
asp-controller
andasp-action
, because it doesn’t have a controller
- Razor Pages doesn’t have
- Startup.cs
- Razor Pages serves by Pages.
- Routing Method: Relative Path
To show a page, it search [Pages] folder and following path with filename