[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.

Login to See the Rest of the Answer

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






© 2023 - ErnesTech - Privacy