1. What can the asp-page tag helper do?
    Help to create a link to a Razor page
  2. What Entity Framework type is used to represent a writable collection of entities in a data source?
    DbSet
  3. What tag helper can set an input element's value and type attributes?
    asp-for
  4. What method in the application Startup class can we use to configure the ASP.NET Core service provider
    ConfigureServices
  5. What interface do we commonly use as a return type from a page method?
    IActionResult
  6. Which method name can you use to build the model in a view component class?
    Invoke
  7. What is the default action value for an HTML form?
    The current URL
  8. Which statement will render a content page inside of a layout page?
    @RenderBody
  9. Which of the following commands will allow you to update a databse with migrations in the current project?
    dotnet ef database update
  10. Which express, when added as the second parameter to the RedirectToPage method, will add a parameter named restaurantId to the request?
    new { restaurantId = 1 }
  11. What method of the Program class is the entry point of the application by default?
    Main
  12. Which attribute will force a string property to hold a non-null value during model binding?
    [Required]
  13. Which is the following must you specify when publishing a self-contained application?
    A runtime identifier (RID)
  14. What is the name of the file where you can register tag helpers for the application?
    _ViewImports
  15. Which method in a Page Model class will respond to an HTTP GET request?
    OnGet
  16. What method of a PageModel allows you to return an HTTP 302 status code?
    RedirectToPage
  17. When working with HTML forms, what HTTP status should a successful POST return?
    A 302 RedirectToPage
  18. What extension method will install the static files middleware?
    UseStaticFiles
  19. What is the name of the file you can use to set a Layout page for multiple views?
    _ViewStart
  20. What dotnet command can give you a directory with all the files you need to deploy an application?
    publish
  21. Which tag helper can set the options for an HTML select element?
    asp-items
  22. Which expression can you use to render a view component named RestaurentCount?
    vc:restaurant-count
  23. What databses does the Entity Framework Core support?
    Microsoft SQL Server only
  24. What is the name of the variable that controls the ASP.NET Core operating environment?
    ASPNETCORE_ENVIRONMENT
  25. Which statement will set the Layout page to use from a content page?
    Layout = "_Layout"
  26. What attribute allows you to receive values from the query string in a page model property?
    [BindProperty]
  27. What data @Model access in a Razor page?
    The page model
  28. What is the name of the file npm uses to store dependencies?
    package.json
  29. What page model property allows you to check the status of validation rules?
    ModelState
  30. What folder allows you to serve static content by default?
    wwwroot
  31. What is the default method value of an HTML form?
    get
  32. By default, validation on the client with ASP.NET Core requires which library?
    jQuery Validation
  33. What command launches the .NET Core Command Line Interface?
    dotnet
  34. Which of the following @page directives optionally takes a route value named id?
    @page {id?:int}
  35. What tag helper assists in showing model binding errors?
    asp-validation-for
  36. Which method on a DbContext will synchronize context changes with the database?
    SaveChanges
  37. Middleware frequently uses the delegate type RequestDelegate. What is the return type of a RequestDelegate?
    Task
  38. What CLI command is a gateway to the Entity Framework tools?
    dotnet ef
  39. Which tag helper will build a link with a value for restaurantId in the URL?
    asp-route-restaurant-id
  40. Which tag helper can set the options for an HTML select element?
    asp-items
  41. What method in the application startup class defines the middleware pipeline?
    Configure
  42. By default, what is the name of an optional section rendered by the default Layout page?
    Scripts
  43. Which will give a page method access to a query string value named search searchTerm?
    Adding a method argument named searchTerm
  44. What can the asp-page tag helper do?
    Help to create a link to a Razor page
  45. What is the name of the folder npm uses to download dependencies?
    node_modules
  46. Which tag helper can you use to render a partial view?
  47. What can the @page directive do in a Razor page?
    Define the model type
  48. What can the asp-page helper do?
    Help to create a link to a Razor page
  49. In regards to the flow within a Model-View-Controller (MVC) application, which flow is correct?
    The controller receives a request, which then invokes the view with model data.
  50. Which tag helper doesn't exist in ASP.NET Core Model-View-Controller (MVC)?
    checkbox
  51. What is the true of the wwwroot folder in an ASP.NET Core Model-View-Controller (MVC) application?
    It's considered the root of the application and contains the static files.
  52. Which method creates a new instance for each use of a service that's registered with the dependency injection system of ASP.NET Core Model-View-Controller (MVC)?
    AddTransient
  53. Why would you use ASP.NET Identity?
    For authentication and authorization
  54. Which method is used to register Model-View-Controller (MVC) classes in the dependency injection container, starting with ASP.NET Core 3.0?
    services.AddControllerWithViews
  55. In Which file will you typically store your connection string to the database when using Entity Framework (EF) Core?
    appsettings.json
  56. What is the base class your Entity Framework (EF) Core context should inherit from?
    DbContext
  57. What's the preferred way of managing client-side scripts in ASP.NET Core Model-View-Controller (MVC) projects?
    Library Manager
  58. When your ASP.NET Core Model-View-Controller (MVC) application is starting, what happens first?
    The Startup class is invoked.
  59. If you create a tag helper class named EmailTagHelper, you can use the tag helper from your view code with what?
  60. To pass a parameter to an action, which tag helper should we use?
    asp-route-*
  61. If you define a route with template {Controller}/{Action}, which route will be a match, assuming no defaults have been defined?
    http://www.bethanyspieshop.com/Home/Index
  62. Why would you use tag helpers in ASP.NET Core Model-View-Controller (MVC)?
    To wrap a piece of HTML that will be generated as part of a Razor view
  63. You have a controller named Pie and an action named List. What is the default route to that controller?
    /Pie/List
  64. The model has a crucial role in an ASP.NET Model-View-Controller (MVC) application. Which task is it not responsible for?
    The model handles the flow of the application
  65. Why would you use a partial view in ASP.NET Core Model-View-Controller (MVC)?
    A partial view can be reused on different views and, as such, brings code-reuse with it.
  66. Which tag helper does not exist in ASP.NET Core Model-View-Controller (MVC)?
    asp-layout
  67. What is a database migration in Entity Framework (EF) Core?
    When you make a change to the model in code, you use a migration to update the database.
  68. Where will you be navigating with this code?
    To the List() on a controller named PieController
  69. What is a strongly-types view in ASP.NET Core Model-View-Controller (MVC)?
    It's a view that "knows" the type to which its's going to be bound.
  70. What is the goal of the ViewStart.cshtml file in ASP.NET Core Model-View-Controller (MVC) projects?
    It's the file that's read for every view that's being rendered and it contains a reference to the layout template.
  71. View components are useful in ASP.NET Core Model-View-Controller (MVC). How can you use it?
    A view component is always used in the context of a parent view.
  72. What is the ViewBag in ASP.NET Core Model-View-Controller (MVC)?
    It's a property defined on the controller that you can use to pass data from the controller to the view.

This free site is ad-supported. Learn more