An example of how to use EF Core to unit test logic that might behave differently when DB is involved. It includes EF Core In-Memory DB and in-memory SQLite providers. The example is built on top of Jason Taylor's Northwind project for sake of simplicity.
Clone or download
Pull request Compare This branch is 4 commits ahead, 73 commits behind JasonGT:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

EF Core unit testing

This repository is a fork from Jason Taylor's Northwind and modified for demonstrating EF Core unit testing for user group presentations.

You can find the original blog post regarding this topic on my blog.

Original Readme:


Northwind Traders is a sample application built using ASP.NET Core and Entity Framework Core.

The initial purpose of this solution is to create a code first version of Northwind, using the .NET Core stack.

The construction of this project is explained in the following blog posts:

Getting Started

Use these instuctions to get the project up and running.


You will need the following tools:


Follow these steps to get your development environment setup:

  1. Clone the repository
  2. At the root directory, restore required packages by running:
    dotnet restore
  3. Next, build the solution by running:
    dotnet build
  4. Finally, within the NorthwindTraders directory, launch the project by running:
    dotnet run


  • .NET Core 2.1 RC
  • ASP.NET Core 2.1 RC
  • Entity Framework Core 2.1 RC


This project is licensed under the MIT License - see the file for details.