Extension for mocking Entity Framework Core operations such ToListAsync, FirstOrDefaultAsync etc. by Moq
When writing tests for your application it is often desirable to avoid hitting the database. The extension allows you to achieve this by creating a context – with behavior defined by your tests – that makes use of in-memory data.
See the version list below for details.
Install-Package MockQueryable.Moq -Version 1.0.3
dotnet add package MockQueryable.Moq --version 1.0.3
<PackageReference Include="MockQueryable.Moq" Version="1.0.3" />
paket add MockQueryable.Moq --version 1.0.3
Added DbSet support