Dependency Injection

Posted by Community Admin on 03-Aug-2018 19:31

Dependency Injection

All Replies

Posted by Community Admin on 27-Dec-2010 00:00

Hi,

I am planning to use Dependency Injection in Sitefinity Project.  Does Sitefinity natively support DI? Is there any particular framework  you recommend to use with Sitefinity? I want to have some guidance on what  frameworks and how to use DI inside sitefinity.

Thank you so much.

--
Preetham Reddy

Posted by Community Admin on 28-Dec-2010 00:00

Hi Preetham,

You can use ObjectFactory class - represents a static factory class for creating application objects and we have an internal method  RegisterIoCTypes which is called inside Container property of type IUnityContainer which defines the behavior of the dependency injection container. So, we use IUnityContainer and Interface Injection.

Inside Application_Start event of Global.asax you can registers types with IoC framework.

You can take a  look at

Inject Some Life into Your Applications—Getting to Know the Unity
Unity DI
Documentation on codeplex

All the best,
Ivan Dimitrov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed