Initializing WCF using Bootstrapper for Unity and Automapper

I use Unity Container and Automapper, and I am looking for a place to call my initialization code and bootstrap in my WCF service. My internet searches recommended one of four approaches, as discussed here http://blogs.msdn.com/b/wenlong/archive/2006/01/11/511514.aspx

(eg 1. Global.asax, 2. App_Code\AppInitialize, 3. custom ServiceHost, and 4. ServiceHostBase.InitializeRuntime) 

However, I was also wondering if anyone had used the "Bootstrapper" http://bootstrapper.codeplex.com/ project with the Unity and Automapper extensions.

So where / what is the best place to call the "Bootstrapper.Run ()" code in a WCF service? A sample code would be very helpful. Thanks!

+6
source share
1 answer

You can use the web activator activation and call initialization method in your bootstrapper class. details https://www.nuget.org/packages/WebActivatorEx/

0
source

Source: https://habr.com/ru/post/922325/


All Articles