Related questions
How to avoid Dependency Injection constructor madness?
I find that my constructors are starting to look like this:
public MyClass(Container con, SomeClass1 obj1, SomeClass2, obj2.... )
with ever increasing parameter list. Since "Container" is my dependency injection container, why can't I just do this:
public MyClass(Container …
How to inject dependency property using Ioc Unity
I have the following classes:
public interface IServiceA
{
string MethodA1();
}
public interface IServiceB
{
string MethodB1();
}
public class ServiceA : IServiceA
{
public IServiceB serviceB;
public string MethodA1()
{
return "MethodA1() " +serviceB.MethodB1();
}
}
public class ServiceB : IServiceB
{
public string MethodB1()
{
return "MethodB1() ";
}
}
I use …