manav inder
manav inder

Reputation: 3601

Ninject using "In SCOPE"

I want to implement IoC in my application, I've few queries regarding that

While binding Interfaces to Classes, i want to specify the scope of the object While resolving the class object, i want it to resolve all the dependencies automatically While passing the vaue type arguments to my binding, how could i use factory methods to pass the value as i don;t want to use constructor arguments for the same

I am using IoC in my WCF application, if i am doing something wrong please suggest some better approch to get best results

Thanks

Upvotes: 1

Views: 760

Answers (1)

Ruben Bartelink
Ruben Bartelink

Reputation: 61795

First of all, be sure to look at Ninject.Extensions.Wcf including the examples and the fact that you put a custom factory in the .svc file.

Then just issue Bind<>().To<>().InXyzScope().WithConstructrorArgument(...)calls in your Module Load.

You havent asked a structured question though so I doubt anyone else is going to be able to make a better stab at an answer than this, which probably isnt going to make you happy...

Upvotes: 1

Related Questions