C#C
C#2y ago
Ares

✅ Help with depedency injection?

So I made an ILoginRepository and then SQLLoginRepository for login/logout routes, I am using Google provider. however, it seems liek the Dependency injection is failing, and I'm not sure why. I've spend about an hour trying to fix it but no luck. Anyone kno why im getting this error:

An unhandled exception occurred while processing the request.
InvalidOperationException: Unable to resolve service for type 'RealTimePolls.Repositories.SQLLoginRepository' while attempting to activate 'RealTimePolls.Controllers.LoginController'.
Microsoft.Extensions.DependencyInjection.ActivatorUtilities.ThrowHelperUnableToResolveService(Type type, Type requiredBy)
Was this page helpful?