R

Ram Sharma • 3.40K Points
Extraordinary

Q. What does `AddDbContext` method do in .NET Core?

  • (A) Adds a new controller
  • (B) Configures routing
  • (C) Registers EF Core context with DI container
  • (D) Maps URL to View

Explanation by: Ram Sharma
`AddDbContext` is used in `Startup.cs` to register a database context with the dependency injection system.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.