Alvecta.Foundation.Application.DI 8.0.80

There is a newer version of this package available.
See the version list below for details.
dotnet add package Alvecta.Foundation.Application.DI --version 8.0.80
                    
NuGet\Install-Package Alvecta.Foundation.Application.DI -Version 8.0.80
                    
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="Alvecta.Foundation.Application.DI" Version="8.0.80" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Alvecta.Foundation.Application.DI" Version="8.0.80" />
                    
Directory.Packages.props
<PackageReference Include="Alvecta.Foundation.Application.DI" />
                    
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 Alvecta.Foundation.Application.DI --version 8.0.80
                    
#r "nuget: Alvecta.Foundation.Application.DI, 8.0.80"
                    
#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 Alvecta.Foundation.Application.DI@8.0.80
                    
#: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=Alvecta.Foundation.Application.DI&version=8.0.80
                    
Install as a Cake Addin
#tool nuget:?package=Alvecta.Foundation.Application.DI&version=8.0.80
                    
Install as a Cake Tool

Alvecta.Foundation.Application.DI

Startup helpers for the dependency-injection module of an Alvecta application layer.

It belongs to the Application.DI layer: the project that wires up the application family (use cases, application services) and is called from the deployable's composition root. Dependencies: Alvecta.Utils.Queryable and Microsoft.Extensions.DependencyInjection.Abstractions.

What it contains

  • Persistence.QueryableConfiguration.UseQueryableAsyncExtensions(IServiceProvider) — connects the Alvecta.Utils.Queryable async LINQ operators (ToListAsync, FirstOrDefaultAsync, CountAsync, ...) to the IQueryableAsyncHelper registered in the container.

Application code composes IQueryable queries from an IQueryableRepository without referencing EF Core, and runs them with the Alvecta.Utils.Queryable operators. Those operators delegate to a static helper that has to be set once at startup. Alvecta.Foundation.Infrastructure.EF registers the EF Core implementation (EFQueryableAsyncHelper); this call installs it.

Usage

dotnet add package Alvecta.Foundation.Application.DI

Call it once, after the service provider is built and before the first query runs:

using Alvecta.Foundation.Application.DI.Persistence;

public static class ApplicationStartup
{
    public static void ConfigureServices(IServiceCollection services)
    {
        services.AddScoped<IGetOrderUseCase, GetOrderUseCase>();
    }

    public static void Configure(IServiceProvider serviceProvider)
    {
        QueryableConfiguration.UseQueryableAsyncExtensions(serviceProvider);
    }
}

// In the composition root, after `var app = builder.Build();`:
ApplicationStartup.Configure(app.Services);

The call throws if no IQueryableAsyncHelper is registered: register the persistence adapter (for example AddDbContextQuerySession from Alvecta.Foundation.Infrastructure.EF) first.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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

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
9.4.91 49 11/20/2026
9.3.90 86 11/13/2026
9.2.89 92 11/12/2026
9.1.88 90 11/11/2026
9.0.87 100 11/4/2026
9.0.86 92 11/4/2026
9.0.85 87 11/4/2026
9.0.84 89 11/4/2026
9.0.83 105 10/29/2026
9.0.82 106 10/29/2026
8.1.81 96 10/29/2026
8.0.80 101 10/28/2026
8.0.79 96 10/28/2026
8.0.78 94 10/28/2026
8.0.77 98 10/28/2026
7.1.76 96 10/27/2026
7.1.75 95 10/26/2026
7.0.74 100 10/26/2026
7.0.73 93 10/23/2026
7.0.72 103 10/23/2026
Loading failed