MVC4 using Unity IoC

julito said:
I'm working with .net 4.5 and MVC4.I implemented Unity IoC as described in the following post: http://kennytordeur.blogspot.com/2011/05/aspnet-mvc-3-and-unity-using.htmlBut I would like to be able to have "register" my repository types using an external XML or within web.config. Is that possible?, samples would be greatly appreciated.thanks

Yes, it is possible. You can find more information http://blogs.msdn.com/b/benoitsarie...ty-2-configuration-file-and-unity-part-2.aspx. If you are interested, i worte (http://kennytordeur.blogspot.be/2012/08/mef-in-aspnet-mvc-4-and-webapi.html) also the same for MEF and it is avalible in nuget http://kennytordeur.blogspot.be/2012/11/nuget-package-integrated-mef-in-aspnet.html. You can configurate MEF to look at a directory that contains your dll's with include the types to "import".
 
Back
Top