MccSoft.IntegreSql.EF 0.8.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package MccSoft.IntegreSql.EF --version 0.8.1                
NuGet\Install-Package MccSoft.IntegreSql.EF -Version 0.8.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MccSoft.IntegreSql.EF" Version="0.8.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MccSoft.IntegreSql.EF --version 0.8.1                
#r "nuget: MccSoft.IntegreSql.EF, 0.8.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install MccSoft.IntegreSql.EF as a Cake Addin
#addin nuget:?package=MccSoft.IntegreSql.EF&version=0.8.1

// Install MccSoft.IntegreSql.EF as a Cake Tool
#tool nuget:?package=MccSoft.IntegreSql.EF&version=0.8.1                

IntegreSql.EF

example workflow NUGET MIT NET6

Provides an infrastructure to easily write FAST integration and unit tests using REAL databases in ASP.Net Core. Powered by the greatest IntegreSQL.

Intro

I assume, you are using EFCore and PostgreSQL in your project. If you don't, you don't need the library, so stop reading now 😃

There are few approaches for 'mocking' the database in autotests.

  1. Use Repository pattern and just mock the repository layer in tests. According to my personal experience this is quite outdated and noone actually does this anymore 😃
  2. The proven approach now is to use EFCore with different database providers.
    1. InMemory Database Provider. Fast, maintained by EF, but is not nearly similar to PostgreSQL, as it's even non-relational. There are A LOT of differences compared to real DB, so going this route is not recommended and discouraged even by Microsoft:

      While in-memory can work for simple, constrained query scenarios, it is highly limited and we discourage its use.

    2. Using Sqlite with filesystem DB or in-memory mode. Works ok, if you don't use any of PostgreSQL specifics (like jsonb or specific functions). Easy to set up and fast. I could recommend it (and this library supports it 😃), considering the mentioned limitations.
    3. Using real PostgreSQL instance. Gives the best confidence that your code works and has all features of PostgreSQL 😃 Unfortunately, it comes at a cost of being quite slow (database creation takes seconds and so does data seeding).

IntegreSQL.EF allows you to use real PostgreSQL instances, and keep the timing under 100ms per test (again, thanks to the IntegreSQL project).

How to use it

Check out example IntegrationTest (i.e using in-memory TestServer and doing API calls)

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.11.2 2,642 9/20/2024
0.11.1 278 9/17/2024
0.10.3 5,295 3/8/2024
0.10.2 131 3/6/2024
0.10.1 135 3/6/2024
0.9.1 139 3/5/2024
0.8.16 11,530 2/2/2023
0.8.15 1,568 12/21/2022
0.8.14 1,923 11/16/2022
0.8.12 634 10/25/2022
0.8.11 376 10/25/2022
0.8.10 2,060 8/21/2022
0.8.9 2,498 5/24/2022
0.8.8 787 5/23/2022
0.8.7 835 5/18/2022
0.8.6 485 5/14/2022
0.8.5 445 5/14/2022
0.8.4 415 5/14/2022
0.8.3 447 5/13/2022
0.8.2 434 5/12/2022
0.8.1 414 5/12/2022