Test Your Knowledge

ASP.NET Core Quiz

Answer all questions to test your understanding

1 What does MVC stand for?
2 What is the main difference between MVC and Razor Pages?
3 When should you use Razor Pages over MVC?
4 What are the three components of the MVC pattern?
5 Which approach is typically simpler for beginners?
6 What is the PageModel in Razor Pages?
7 How do you define a custom route in Razor Pages?
8 What is the default routing convention in Razor Pages?
9 Which route constraint ensures a parameter is a valid integer?
10 How do you access a route parameter in the PageModel?
11 What are Tag Helpers in ASP.NET Core?
12 Which Tag Helper creates a link to another page?
13 What does the asp-for Tag Helper do?
14 What is the purpose of the asp-validation-summary Tag Helper?
15 Can you create custom Tag Helpers in ASP.NET Core?
16 What is model binding in ASP.NET Core?
17 Which attribute is used to bind a property to form data?
18 What is the Post-Redirect-Get (PRG) pattern?
19 How do you handle form submission in Razor Pages?
20 What is the purpose of the [BindProperty] attribute?
21 What are Data Annotations in ASP.NET Core?
22 Which attribute marks a property as required?
23 How do you specify a custom error message for validation?
24 What does ModelState.IsValid check?
25 Can you create custom validation attributes?
26 What is a Layout in Razor Pages?
27 What is the purpose of @RenderBody() in a Layout?
28 How do you specify which Layout a page should use?
29 What is a Partial View in Razor Pages?
30 How do you include a Partial View in a Razor Page?
31 What is Dependency Injection (DI)?
32 Which service lifetime creates a new instance every time it's requested?
33 Which service lifetime creates one instance per HTTP request?
34 Which service lifetime creates one instance for the entire application lifetime?
35 How do you register a service in ASP.NET Core?
36 What does CRUD stand for?
37 Which method is used to add a new entity to the database in EF Core?
38 What is the purpose of EntityState.Modified?
39 How do you delete an entity in EF Core?
40 What is the purpose of Include() in EF Core?