EntityFrameworkCore.Parallel 3.0.6

There is a newer version of this package available.
See the version list below for details.
dotnet add package EntityFrameworkCore.Parallel --version 3.0.6
                    
NuGet\Install-Package EntityFrameworkCore.Parallel -Version 3.0.6
                    
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="EntityFrameworkCore.Parallel" Version="3.0.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EntityFrameworkCore.Parallel" Version="3.0.6" />
                    
Directory.Packages.props
<PackageReference Include="EntityFrameworkCore.Parallel" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add EntityFrameworkCore.Parallel --version 3.0.6
                    
#r "nuget: EntityFrameworkCore.Parallel, 3.0.6"
                    
#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.
#:package EntityFrameworkCore.Parallel@3.0.6
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=EntityFrameworkCore.Parallel&version=3.0.6
                    
Install as a Cake Addin
#tool nuget:?package=EntityFrameworkCore.Parallel&version=3.0.6
                    
Install as a Cake Tool

EntityFrameworkCore.Parallel

This extension to Entity Framework Core adds a Set<TContext, TEntity>() method to IDbContextFactory<TContext>. This allows you to easily execute multiple queries in parallel without the need to write complex code, or a lot of using blocks or statements. You can stick to all your known methods from IQueryable<TEntity>. As the context is disposed after your query is executed, all results will obviously not be tracked and disconnected from any DbContext.

How to use

In your Startup class, add a DbContextfactory. If you want a pooled one, or not is up to you.

services.AddPooledDbContextFactory<OrderContext>(options => options.UseSqlServer(@"Server=(localdb)\mssqllocaldb;Database=OrderTest"));

In your business class, inject an IDbContextFactory<TContext> and use it like this

var ordersFromDb = await _factory.Parallel().Set<Order>().Where(o => o.Id > 3).ToListAsync();

Or like this

var ordersFromDb = await _factory.Set<MyContext, Order>().Where(o => o.Id > 3).ToListAsync();

Migration from Entity Framework Core 5 to 6

In Entity Framework Core 6, IDbContextFactory<TContext> is no longer covariant (TContext is not marked with the out keyword). Because of that, the following code does no longer work.

var ordersFromDb = await _factory.Set<Order>().Where(o => o.Id > 3).ToListAsync();

See the How to use section for two possibilities that you can use instead. If you want some background information, have a look at https://github.com/dotnet/efcore/issues/26630

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on EntityFrameworkCore.Parallel:

Package Downloads
RESTworld.Business

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
6.0.2 139 2/10/2026
6.0.1 236 1/18/2026
6.0.0 572 11/11/2025
5.0.4 286 11/9/2025
5.0.3 525 9/16/2025
5.0.2 418 6/19/2025
5.0.1 650 1/28/2025
5.0.0 482 11/19/2024
4.1.1 5,877 10/11/2024
4.1.0 3,694 9/20/2024
4.0.5 1,105 7/10/2024
4.0.4 422 6/4/2024
4.0.3 245 5/24/2024
4.0.2 934 4/19/2024
4.0.1 2,110 1/9/2024
4.0.0 809 11/14/2023
3.0.9 563 10/23/2023
3.0.8 601 9/5/2023
3.0.7 613 7/17/2023
3.0.6 570 6/28/2023
Loading failed