Is there an in-memory provider for Entity Framework?

前端 未结 8 2339
情书的邮戳
情书的邮戳 2020-12-05 22:42

I am unit testing code written against the ADO .NET Entity Framework. I would like to populate an in-memory database with rows, and make sure that my code retrieves them pro

8条回答
  •  渐次进展
    2020-12-05 23:31

    The article http://www.codeproject.com/Articles/460175/Two-strategies-for-testing-Entity-Framework-Effort  describes Effort  -Entity Framework provider that runs in memory.

    You can still use your DbContext or ObjectContext classes within unit tests, without having to have an actual database.

提交回复
热议问题