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

preview_player
Показать описание
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.

Рекомендации по теме
Комментарии
Автор

There is no startup anymore in VS 2022!

DB-hces
Автор

hello i dont have startup file anymore i belive its obsolte and i have prgram and json files and all lokks ok i i still get errro net core 6.0.12 Lisa

pjmclenon