4

I've setup Castle Windsor in my ASP.NET Mvc 3 project and added the following property on HomeController:

    private IUserService UserService
    {
        get;
        set;
    }

When I try using UserService in an action method it's always null. But, if I change the property to public it gets automatically instantiated by Castle Windsor.

Is it possible to have automatic property injection with non-public properties?

Lester
  • 4,243
  • 2
  • 27
  • 31

1 Answers1

1

No it is not possible for the reason that @Mauricio Scheffer comment outlines

Krzysztof Kozmic
  • 27,267
  • 12
  • 73
  • 115