Dependency injection using Unity and storing config data in database

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
i am new in dependency injection. when i work dependency using unity then i always create a config file for loading dependency. for example our config look like <unity xmlns="http://schemas.microsoft.com/practices/2010/unity
<alias type="UnityTest.ILogger, UnityTest" alias="ILogger" />
<namespace name="UnityTest"/>

<container>
<register mapTo="UnityTest.FileLogger, UnityTest" name="MyFileLogger" type="ILogger"/>
<register mapTo="UnityTest.SQLLogger, UnityTest" name="MySQLLogger" type="ILogger"/>
<register mapTo="UnityTest.WindowsEventLogger, UnityTest" name="MyWindowsEventLogger" type="ILogger"/>
</container>
</unity>i just need to know how can i store this above xml in our database and force unity to read those config entry from database for loading dll instead of reading those from config file. is it at all possible.....if yes then please guide me how can i force unity to read config data from database. thanks

View the full article
 
Back
Top