[AspNet 6] Using Generic Types in an Interface MVC C-Sharp

Question: How do you inject an Interface with a generic Type defined? When try to inject the Interface in Dependency Injection (ctor) I am getting an error that says, CS0452: The type 'T' must be a reference type in order to use it as parameter 'T' in the generic type or method.

Answer: Do you know someone who can answer this question?


Edit this Article
'T' in the generic type or method Questions published
Was this page helpful?
Yes Yes! this solution to the problem was helpful. No No! this solution to the problem was not helpful.. Leave ErnesTech Feedback.Feedback
If you log in, you will be notified when someone leaves a comment.

Other users would like to know if this solution helped you.

Your Session is Ending
Login to Continue

© 2021 - ErnesTech - Privacy