1
Normally I use the constructor to get dependencies something like:
public class Test
{
private IServiceDependency serviceDependency;
Test(IServiceDependency serviceDependency)
{
_serviceDependency = serviceDependency;
}
}
How do I get dependency without using the constructor
GetDependence();
is just a method to illustrate how you would like to get dependency on . net core
public class Test
{
private IServiceDependency serviceDependency;
Test()
{
_serviceDependency = GetDependence();
}
}
Saw the answer?
– novic
Didn’t you see? asked and there’s no interaction?
– novic