C# WebForms and Ninject
Posted
by
ipohfly
on Programmers
See other posts from Programmers
or by ipohfly
Published on 2012-10-15T08:29:15Z
Indexed on
2012/10/15
9:48 UTC
Read the original article
Hit count: 291
I'm re-working on the design of an existing application which is build using WebForms. Currently the plan is to work it into a MVP pattern application while using Ninject as the IoC container.
The reason for Ninject to be there is that the boss had wanted a certain flexibility within the system so that we can build in different flavor of business logic in the model and let the programmer to choose which to use based on the client request, either via XML configuration or database setting.
I know that Ninject have no need for XML configuration, however I'm confused on how it can help to dynamically inject the dependency into the system?
Imagine I have a interface IMember
and I need to bind this interface to the class decided by a xml or database configuration at the launch of the application, how can I achieve that?
© Programmers or respective owner