简体   繁体   中英

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

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 ef 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...

您可以尝试使用此 EF6 内存中提供程序: https : //entityframework-effort.net/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM