How to Resolve multiple DB contexts in Unity Of Config?

Sep 27, 2015 at 2:56 AM
I know we can use multiple datacontexts in a WEB API solution? But how dow we resolve them using UnityOfconfig?

The problem is we have multiple DBcontexts in our WEBAPI soulution. Although the DBContexts never interact each other, i have no clue on declaring them in Unity Of Config as it gives ambiguous results? The example provided in the codeplex project deals only with one DBContext. what if we there are multiple DBContexts? For example....
container.RegisterType<IDataContextAsync, DBContext1>(new PerRequestLifetimeManager())

container.RegisterType<IDataContextAsync, DBContext2>(new PerRequestLifetimeManager())
Sep 29, 2015 at 3:20 AM
Edited Sep 29, 2015 at 3:22 AM
There are 2 ways to resolve. One is using DI approach and another one is to extend the URF framework. I followed the second one and it worked.

Please see the below post for more details:
Marked as answer by vinaykasireddy on 9/28/2015 at 7:21 PM