Reputation: 4369
Is it enought to call Mapper.Initialize in Application_Start() in global.asax or should some IoC container take care of the lifetime scoping ?
protected void Application_Start()
{
Mapper.Initialize(x=>x.AddProfile(new SomeProfile()));
}
Upvotes: 1
Views: 1743
Reputation: 14677
Should be enough. I've never had a problem with initializing Automapper this way.
Upvotes: 4