[Solved] InvalidOperationException: Unable to resolve service for type ‘Interface’ while attempting to activate the Controller in Asp.net core
Problem: In .NET Core MVC application, I was using Dependency Injection and Repository Pattern to inject a repository to my controller. However, I am getting an error: InvalidOperationException: Unable to resolve service for type ‘API_IN_COMPARE.Interface.ICategory’ while attempting to activate ‘API_IN_COMPARE.Controllers.WeatherForecastController’.…