What is Razor Pages?
When to use Razor Pages instead of
MVC?
- Razor Pages is a page-based programming model introduced in
ASP.NET Core 2.0.
- Each .cshtml file has an associated PageModel class (like a view +
controller combined).
- Best for simple UI-focused apps or CRUD pages.
✅ Use Razor Pages for:
- Simpler, page-focused apps
✅ Use MVC for:
- Complex, controller-based routing or large, structured apps