How do I create an in memory DbContext with Entity Framework 6?

c# entity-framework entity-framework-6

Question

How do I create an in memory version of a DbContext for testing in entity framework 6? I cannot use .NET core for this project, it must be e.f. 6. I already have a custom db context created that connects to sql server and works great.

Doing this in .NET core is trivial, I am hoping something exists for legacy entity framework / .NET framework as well, but so far no luck on my searches...

1
1
1/23/2020 7:07:53 PM

Accepted Answer

You could try this in-memory provider for EF6: https://entityframework-effort.net/

3
1/23/2020 6:41:16 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow