When configuring EF Core with ASP.NET Core, which class is typically used to represent the database's context?
- DbContext
- DbSet
- EntityContext
- DataContext
In EF Core, the class used to represent the database's context is typically named DbContext. This class acts as the entry point for interacting with the database, containing DbSet properties that represent tables and allowing you to define database operations. DbSet represents individual tables, while EntityContext and DataContext are not standard EF Core classes.
Loading...
Related Quiz
- You've deployed an ASP.NET Core application, but users report they're not able to access CSS and images. Which middleware might you have forgotten to configure in Startup.cs?
- Suppose you are building a dashboard in ASP.NET Core MVC. The dashboard needs to display a summary of various data points. Which component would be best suited to decide which data to fetch and how to process it for display?
- Which tool would you use for building, running, and managing .NET applications without an IDE?
- What is the primary purpose of the [Authorize] attribute in ASP.NET Core?
- In a CI/CD pipeline, what does the acronym CI stand for?