Injecting a Repository in a Controller
Learn how you can inject your repositories into your controller.
We'll cover the following
Updating Startup.cs
To allow repository injection into your controllers, the ConfigureServices()
method inside Startup.cs
needs to be updated by adding the following two lines of code.
Get hands-on with 1400+ tech skills courses.