This is the situation, I'm using a Razor page to create an ASP.NET Core 6 MVC site for a friend, the thing is I'm trying to inject a controller into another controller and I'm getting an error while building the project.
Here is a screenshot showing the error:
I made sure to have the interface class added in Program.cs
(I used AddTransient<,>()
however it didn't worked with scoped or singleton either, I'm not sure of the difference between them).
So now I'm wondering if controllers are not supposed to be instantiated via DI.
If you guys need any extra information I'm more than pleased to share it!