vany0114 / EF.DbContextFactory

With EF.DbContextFactory you can resolve easily your DbContext dependencies in a safe way injecting a factory instead of an instance itself, enabling you to work in multi-thread contexts with Entity Framework or just work safest with DbContext following the Microsoft recommendations about the DbContext lifetime.
http://elvanydev.com/EF-DbContextFactory/
MIT License
93 stars 21 forks source link

Unity.Abstractions? #14

Closed okonomiyaki3000 closed 5 years ago

okonomiyaki3000 commented 5 years ago

I'm using the Unity version. When I try to use container.AddDbContextFactory<...>(), I get an error like "The type IUnityContainer is defined in an assembly that is not referenced. You must add a reference to assembly 'Unity.Abstractions yadda yadda yadda'"

Any idea what I could be doing wrong?

okonomiyaki3000 commented 5 years ago

Ah, I see... It requires version 2.2.0.0? Can that be right? My version is much newer for some reason.

vany0114 commented 5 years ago

@okonomiyaki3000 Sorry for the very delayed answer but somehow I missed it. Did you manage to figure that out?

okonomiyaki3000 commented 5 years ago

@vany0114 nope. I gave up and didn't use DbContextFactory.