DEV Community

Avinash Gaikwad
Avinash Gaikwad

Posted on

Want to know how to inject an abstract class in .NET core?

Hi All,

Can any one please guide me or post link where I can see how to inject an abstract class in .NET core?

Thanks in Advance!!!

Top comments (1)

Collapse
 
dev001 profile image
dev-001

You can’t use directly abstract class, there for the name :)
Make an class that inherits this abstract class.
Now add you class to DI, add you class to constructor where you are trying to inject it.