I registered my type like this:
container.RegisterType<IUnitOfWork, MainDataContext>(new PerRequestLifetimeManager(), new InjectionMember[] { new InjectionConstructor("") });
and i try to resolve it like this:
_unitOfWork = container.Resolve<IUnitOfWork>(new ParameterOverride("connectionString", currentConnection));
but at a alarming rate (1 every 200) this resolution returns null
! retrying to resolve does not work...
Details:
- Problem first detected on Unity version 5.6 but persist on 5.7
- Using .net 4.7 with 4.7 runtime
- If i inspect the container registrations, the one i'm hoping to get is listed there!