NativeData.Extensions.DependencyInjection 1.0.1

dotnet add package NativeData.Extensions.DependencyInjection --version 1.0.1
                    
NuGet\Install-Package NativeData.Extensions.DependencyInjection -Version 1.0.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="NativeData.Extensions.DependencyInjection" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NativeData.Extensions.DependencyInjection" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="NativeData.Extensions.DependencyInjection" />
                    
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 NativeData.Extensions.DependencyInjection --version 1.0.1
                    
#r "nuget: NativeData.Extensions.DependencyInjection, 1.0.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.
#:package NativeData.Extensions.DependencyInjection@1.0.1
                    
#: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=NativeData.Extensions.DependencyInjection&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=NativeData.Extensions.DependencyInjection&version=1.0.1
                    
Install as a Cake Tool

NativeData.Extensions.DependencyInjection

Microsoft.Extensions.DependencyInjection integration for NativeData.

Contents

  • AddNativeData<TContext>() — registers a scoped NativeDataContext subclass, a singleton IDbConnectionFactory, and a singleton ISqlDialect
  • NativeDataOptions — configuration object passed to provider extension methods (UseSqlite, UsePostgres)

Usage

builder.Services.AddNativeData<AppContext>(o => o.UseSqlite("Data Source=app.db"));
// or
builder.Services.AddNativeData<AppContext>(o => o.UsePostgres(connectionString));

Provider extension methods (UseSqlite, UsePostgres) are shipped in their respective provider packages — NativeData.Sqlite and NativeData.Postgres.

Service lifetimes

Service Lifetime
TContext Scoped
IDbConnectionFactory Singleton
ISqlDialect Singleton

AOT / Trimming

AOT-safe. AddNativeData<TContext>() is annotated with [DynamicallyAccessedMembers(PublicConstructors)] — the only reflection touch point. Entity map registration uses the generated NativeDataEntityMaps.Create<T>() factory with no runtime type scanning.

Build

dotnet build src/NativeData.Extensions.DependencyInjection/NativeData.Extensions.DependencyInjection.csproj

Packaging

This project is packable and published as a NuGet package.

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 (2)

Showing the top 2 NuGet packages that depend on NativeData.Extensions.DependencyInjection:

Package Downloads
NativeData.Sqlite

NativeData is an AOT-first ORM foundation for .NET with provider-agnostic runtime contracts and source-generation-oriented architecture.

NativeData.Postgres

NativeData is an AOT-first ORM foundation for .NET with provider-agnostic runtime contracts and source-generation-oriented architecture.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 98 3/22/2026
0.7.1 94 3/22/2026
0.6.2 108 3/22/2026

Use docs/release-notes-template.md as the baseline for release notes and changelog entries.