The [Route("{action=Index}")] attribute specifies a default value for the action, which in this case is ______.

  • "Default"
  • "Action"
  • "Index"
  • "Value"
In this attribute route, the [Route("{action=Index}")] attribute specifies that if the 'action' parameter is not provided in the URL, it defaults to "Index." This is a useful way to set default actions for controller methods when no specific action is mentioned in the route.

For ASP.NET Core, the _________ attribute helps in grouping multiple related test methods.

  • [TestClass]
  • [TestGroup]
  • [TestMethodGroup]
  • [TestGrouping]
In ASP.NET Core, the [TestClass] attribute is used to define a test class, and it helps in grouping multiple related test methods within that class. Grouping makes it easier to organize and run tests, especially when dealing with a large number of tests in a project.

In the context of Razor views, which directive would you use in _ViewImports.cshtml to define a shared model type across views?

  • @model
  • @inherits
  • @using
  • @namespace
To define a shared model type across Razor views, you would use the @inherits directive in the _ViewImports.cshtml file. This directive specifies the base class for all views in the directory, allowing you to set a common model type for those views.

In which file or method is the exception handling middleware typically configured in an ASP.NET Core application?

  • Startup.cs -> ConfigureServices
  • appsettings.json
  • Program.cs -> Main method
  • HomeController.cs
In an ASP.NET Core application, the exception handling middleware is typically configured in the Startup.cs file, specifically in the ConfigureServices method, where services like UseExceptionHandler or UseDeveloperExceptionPage are added to the middleware pipeline.

You're developing a backend service for a mobile app that will only return JSON data. Which ASP.NET Core template should you start with?

  • MVC
  • Razor Pages
  • Web API
  • Blazor Server
When developing a backend service that exclusively returns JSON data for a mobile app, you should start with the Web API template. Web API is specifically designed for building RESTful services that can provide data in formats like JSON, making it a suitable choice for this scenario.

For ASP.NET Core, what tool can be utilized to measure the coverage of your unit tests?

  • MSTest
  • xUnit
  • NUnit
  • OpenCover
OpenCover is a popular tool used for measuring code coverage in ASP.NET Core projects. It provides insights into which parts of your codebase are covered by unit tests, helping you identify areas that may need additional testing.

You're deploying your ASP.NET Core application on Azure. To monitor the application's performance and health, which Azure service can you use?

  • Azure Monitor
  • Azure Functions
  • Azure Storage
  • Azure Machine Learning
Azure Monitor is the Azure service designed for monitoring and gaining insights into the performance, health, and usage of applications deployed on Azure, including ASP.NET Core applications. It provides comprehensive monitoring and diagnostic capabilities.

To create users in ASP.NET Core Identity, developers typically interact with the _________ class.

  • ApplicationUser
  • UserManager
  • UserFactory
  • IdentityUser
To create users in ASP.NET Core Identity, developers typically interact with the 'UserManager' class. The 'UserManager' provides methods for user management, including user creation, deletion, and more.

Shadow properties are fields that aren't present in your entity class but are represented in the database. You define these using the _________ method in Fluent API.

  • HasField
  • HasShadow
  • AddShadow
  • DefineField
Shadow properties are fields that exist only in the database and not in your entity class. You can define these using the HasShadow method in Fluent API when configuring your entity in ASP.NET Core Entity Framework.

After writing your ASP.NET Core application code, you want to build and run your application using a command-line tool. Which tool would you use for this purpose?

  • .NET CLI (Command Line Interface)
  • Git Bash
  • PowerShell
  • Command Prompt
To build and run your ASP.NET Core application from the command line, you would use the .NET CLI (Command Line Interface). It's a powerful tool that provides various commands for managing and running your ASP.NET Core projects efficiently.