Exception Error: Unable to Resolve Service for Type Model while Attempting to Activate Controller

Опубликовано: 08 Октябрь 2024
на канале: localhost
5,176
11

Hello guys here in this video, I have explained that how we can fix the error System.InvalidOperationException: Unable to resolve service for type 'ClassLibrary.Model.Models.DbModel.Profile' while attempting to activate 'WebApplicationAPI.Controllers.AccountController'. at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.GetService(IServiceProvider sp, Type type, Type requiredBy, Boolean isDefaultParameterRequired)

We get this error while applying dependency injection in the constructor of a controller.

Go to this link to take the test to identify yourself.
https://oktests.com/

Like us on Facebook:   / oktests