![Fix the 'Unable to resolve service for type Microsoft EntityFrameworkCore DbContext' error after scaffolding an MVC Controller in Visual Studio Fix the 'Unable to resolve service for type Microsoft EntityFrameworkCore DbContext' error after scaffolding an MVC Controller in Visual Studio](https://davecallan.com/wp-content/uploads/2021/03/scaffolded-controller.png)
Fix the 'Unable to resolve service for type Microsoft EntityFrameworkCore DbContext' error after scaffolding an MVC Controller in Visual Studio
![Unable to resolve service for type 'System.Net.Http.HttpClient' · Issue #1079 · dotnet/extensions · GitHub Unable to resolve service for type 'System.Net.Http.HttpClient' · Issue #1079 · dotnet/extensions · GitHub](https://user-images.githubusercontent.com/1334977/52354927-7b6f8a80-2a18-11e9-9791-bb0b40fb8fd7.png)
Unable to resolve service for type 'System.Net.Http.HttpClient' · Issue #1079 · dotnet/extensions · GitHub
![c# - Why do I get this InvalidOperationException: Unable to resolve service for type 'Microsoft.AspNetCore.Http.RequestDelegate'? - Stack Overflow c# - Why do I get this InvalidOperationException: Unable to resolve service for type 'Microsoft.AspNetCore.Http.RequestDelegate'? - Stack Overflow](https://i.stack.imgur.com/vDX3F.png)
c# - Why do I get this InvalidOperationException: Unable to resolve service for type 'Microsoft.AspNetCore.Http.RequestDelegate'? - Stack Overflow
![InvalidOperationException Unable resolve service Context attempt activate Controller ASP.NET Core - YouTube InvalidOperationException Unable resolve service Context attempt activate Controller ASP.NET Core - YouTube](https://i.ytimg.com/vi/C2L7SUZY9fw/maxresdefault.jpg)
InvalidOperationException Unable resolve service Context attempt activate Controller ASP.NET Core - YouTube
![Dependency Injection issue: Unable to resolve service for type ... while attempting to activate [TimerFunction] · Issue #4939 · Azure/azure-functions-host · GitHub Dependency Injection issue: Unable to resolve service for type ... while attempting to activate [TimerFunction] · Issue #4939 · Azure/azure-functions-host · GitHub](https://user-images.githubusercontent.com/9808053/65419923-ae279100-ddf7-11e9-96d7-b870286ada95.png)
Dependency Injection issue: Unable to resolve service for type ... while attempting to activate [TimerFunction] · Issue #4939 · Azure/azure-functions-host · GitHub
![How to fix error: Unable to Resolve Service for Type Interface | Asp.Net Core MVC with Repository - YouTube How to fix error: Unable to Resolve Service for Type Interface | Asp.Net Core MVC with Repository - YouTube](https://i.ytimg.com/vi/qhBF3eMpX0E/maxresdefault.jpg)
How to fix error: Unable to Resolve Service for Type Interface | Asp.Net Core MVC with Repository - YouTube
![c# - InvalidOperationException: Unable to resolve service for type 'IDocumentService' while attempting to activate 'DocumentController' - Stack Overflow c# - InvalidOperationException: Unable to resolve service for type 'IDocumentService' while attempting to activate 'DocumentController' - Stack Overflow](https://i.stack.imgur.com/4Mh01.png)
c# - InvalidOperationException: Unable to resolve service for type 'IDocumentService' while attempting to activate 'DocumentController' - Stack Overflow
![asp.net core - Unable to resolve service for type 'Microsoft.ApplicationInsights.TelemetryClient' - Stack Overflow asp.net core - Unable to resolve service for type 'Microsoft.ApplicationInsights.TelemetryClient' - Stack Overflow](https://i.stack.imgur.com/8GAMQ.png)
asp.net core - Unable to resolve service for type 'Microsoft.ApplicationInsights.TelemetryClient' - Stack Overflow
![asp.net core mvc - Unable to resolve service for type 'Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper' - Stack Overflow asp.net core mvc - Unable to resolve service for type 'Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper' - Stack Overflow](https://i.stack.imgur.com/TTKPO.png)
asp.net core mvc - Unable to resolve service for type 'Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper' - Stack Overflow
![c# - Swagger error on .net core 3.0 webapi on windows (Unable to resolve service for type 'ISwaggerProvider' ) - Stack Overflow c# - Swagger error on .net core 3.0 webapi on windows (Unable to resolve service for type 'ISwaggerProvider' ) - Stack Overflow](https://i.stack.imgur.com/meumg.jpg)
c# - Swagger error on .net core 3.0 webapi on windows (Unable to resolve service for type 'ISwaggerProvider' ) - Stack Overflow
![Dependency Injection issue: Unable to resolve service for type ... while attempting to activate [TimerFunction] · Issue #4939 · Azure/azure-functions-host · GitHub Dependency Injection issue: Unable to resolve service for type ... while attempting to activate [TimerFunction] · Issue #4939 · Azure/azure-functions-host · GitHub](https://user-images.githubusercontent.com/9808053/65702629-41242d80-e07b-11e9-87b5-1368c42da527.png)
Dependency Injection issue: Unable to resolve service for type ... while attempting to activate [TimerFunction] · Issue #4939 · Azure/azure-functions-host · GitHub
InvalidOperationException: Unable to resolve service for type X with an ASP.NET Core Web Application (.NET Core 2.0) · Issue #21 · seesharper/LightInject.Microsoft.DependencyInjection · GitHub
![asp.net core mvc - Unable to resolve service for type 'Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper' - Stack Overflow asp.net core mvc - Unable to resolve service for type 'Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper' - Stack Overflow](https://i.stack.imgur.com/rPG8y.png)
asp.net core mvc - Unable to resolve service for type 'Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper' - Stack Overflow
![Hangfire: Not able to resolve services from the OrchardCore · Issue #7437 · OrchardCMS/OrchardCore · GitHub Hangfire: Not able to resolve services from the OrchardCore · Issue #7437 · OrchardCMS/OrchardCore · GitHub](https://user-images.githubusercontent.com/11371581/97576011-324b3f80-1a20-11eb-96e4-53c432fb1627.png)
Hangfire: Not able to resolve services from the OrchardCore · Issue #7437 · OrchardCMS/OrchardCore · GitHub
![ASP.Net Core API Error (Unable to resolve service for type 'TapAPI.Models.TodoContext' while attempting to activate 'TapAPI.Controllers.TapController') - Microsoft Q&A ASP.Net Core API Error (Unable to resolve service for type 'TapAPI.Models.TodoContext' while attempting to activate 'TapAPI.Controllers.TapController') - Microsoft Q&A](https://learn.microsoft.com/api/attachments/187019-image.png?platform=QnA)
ASP.Net Core API Error (Unable to resolve service for type 'TapAPI.Models.TodoContext' while attempting to activate 'TapAPI.Controllers.TapController') - Microsoft Q&A
![EF Migration Error : Unable to resolve service for type 'Microsoft.EntityFrameworkCore.DbContextOptions · Issue #15145 · dotnet/efcore · GitHub EF Migration Error : Unable to resolve service for type 'Microsoft.EntityFrameworkCore.DbContextOptions · Issue #15145 · dotnet/efcore · GitHub](https://user-images.githubusercontent.com/49604292/103147669-a2a2e280-477d-11eb-960c-456f441f46aa.png)
EF Migration Error : Unable to resolve service for type 'Microsoft.EntityFrameworkCore.DbContextOptions · Issue #15145 · dotnet/efcore · GitHub
InvalidOperationException: Unable to resolve service for type · Issue #3343 · dotnet/aspnetcore · GitHub
![ASP.Net Core API Error (Unable to resolve service for type 'TapAPI.Models.TodoContext' while attempting to activate 'TapAPI.Controllers.TapController') - Microsoft Q&A ASP.Net Core API Error (Unable to resolve service for type 'TapAPI.Models.TodoContext' while attempting to activate 'TapAPI.Controllers.TapController') - Microsoft Q&A](https://learn.microsoft.com/api/attachments/187037-image.png?platform=QnA)
ASP.Net Core API Error (Unable to resolve service for type 'TapAPI.Models.TodoContext' while attempting to activate 'TapAPI.Controllers.TapController') - Microsoft Q&A
![Unable to resolve service for type 'Sitecore.EmailCampaign.Cd.Services.IClientApiService' while attempting to activate… – Andy Burns' Blog Unable to resolve service for type 'Sitecore.EmailCampaign.Cd.Services.IClientApiService' while attempting to activate… – Andy Burns' Blog](https://andrewwburns.files.wordpress.com/2018/08/c2a0sitecore-emailexperience-contentdelivery-config.png)
Unable to resolve service for type 'Sitecore.EmailCampaign.Cd.Services.IClientApiService' while attempting to activate… – Andy Burns' Blog
![InvalidOperationException Unable resolve service Context attempt activate Controller ASP.NET Core - YouTube InvalidOperationException Unable resolve service Context attempt activate Controller ASP.NET Core - YouTube](https://i.ytimg.com/vi/C2L7SUZY9fw/hq720.jpg?sqp=-oaymwEhCK4FEIIDSFryq4qpAxMIARUAAAAAGAElAADIQj0AgKJD&rs=AOn4CLCB6dOeYMZdWtkG8_LfWEOpbEd3Tw)
InvalidOperationException Unable resolve service Context attempt activate Controller ASP.NET Core - YouTube
![asp.net core webapi - There was an error running the selected code generator: Unable to resolve service for type 'Microsoft.EntityFrameworkCore.DbContextOption - Stack Overflow asp.net core webapi - There was an error running the selected code generator: Unable to resolve service for type 'Microsoft.EntityFrameworkCore.DbContextOption - Stack Overflow](https://i.stack.imgur.com/5Lzwg.png)
asp.net core webapi - There was an error running the selected code generator: Unable to resolve service for type 'Microsoft.EntityFrameworkCore.DbContextOption - Stack Overflow
![Exception Error: Unable to Resolve Service for Type Model while Attempting to Activate Controller - YouTube Exception Error: Unable to Resolve Service for Type Model while Attempting to Activate Controller - YouTube](https://i.ytimg.com/vi/xfYij4_5PRQ/maxresdefault.jpg)
Exception Error: Unable to Resolve Service for Type Model while Attempting to Activate Controller - YouTube
![c# - ASP.NET Core Dependency Injection error - Unable to resolve service for type "Repository" while attempting to activate "Service" - Stack Overflow c# - ASP.NET Core Dependency Injection error - Unable to resolve service for type "Repository" while attempting to activate "Service" - Stack Overflow](https://i.stack.imgur.com/jsEWI.png)
c# - ASP.NET Core Dependency Injection error - Unable to resolve service for type "Repository" while attempting to activate "Service" - Stack Overflow
![InvalidOperationException: Unable to resolve service for type 'Cosmonaut.ICosmosStore`1[SocialNet.Models.User]' while attempting to activate 'SocialNet.Controllers.UserController'. · Issue #11 · Elfocrash/Cosmonaut · GitHub InvalidOperationException: Unable to resolve service for type 'Cosmonaut.ICosmosStore`1[SocialNet.Models.User]' while attempting to activate 'SocialNet.Controllers.UserController'. · Issue #11 · Elfocrash/Cosmonaut · GitHub](https://user-images.githubusercontent.com/18134352/40274008-0609512e-5b81-11e8-9290-d1456a38f4a3.png)