Unit-Testing Entity Framework 6 with SQLite Inmemory Database

In fact, I am moving unit tests from a .NET Core project to a .NET Framework project. I used to migrate a project using EF Core to a project using EF 6.

Now I want to use my DBContext for my unit tests. I set it up in my .NET Core Unit-Test project, as here: https://github.com/doubleSlashde/ASPNETCoreExample/blob/master/Tests/RepositoryTests/TestBase.cs . But this only works with EF Core.

How do I configure DBContext now in my Unit-Test project (.NET Framework 4.6)? The premise is that I can use Full Text Search . For SQLite, I used one of the FTS extensions.

+4
source share

Source: https://habr.com/ru/post/1687277/


All Articles