CommunityToolkit.Aspire.Microsoft.EntityFrameworkCore.Sqlite 9.8.0-preview.1.250926-0110

Prefix Reserved
This is a prerelease version of CommunityToolkit.Aspire.Microsoft.EntityFrameworkCore.Sqlite.
dotnet add package CommunityToolkit.Aspire.Microsoft.EntityFrameworkCore.Sqlite --version 9.8.0-preview.1.250926-0110
                    
NuGet\Install-Package CommunityToolkit.Aspire.Microsoft.EntityFrameworkCore.Sqlite -Version 9.8.0-preview.1.250926-0110
                    
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="CommunityToolkit.Aspire.Microsoft.EntityFrameworkCore.Sqlite" Version="9.8.0-preview.1.250926-0110" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CommunityToolkit.Aspire.Microsoft.EntityFrameworkCore.Sqlite" Version="9.8.0-preview.1.250926-0110" />
                    
Directory.Packages.props
<PackageReference Include="CommunityToolkit.Aspire.Microsoft.EntityFrameworkCore.Sqlite" />
                    
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 CommunityToolkit.Aspire.Microsoft.EntityFrameworkCore.Sqlite --version 9.8.0-preview.1.250926-0110
                    
#r "nuget: CommunityToolkit.Aspire.Microsoft.EntityFrameworkCore.Sqlite, 9.8.0-preview.1.250926-0110"
                    
#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 CommunityToolkit.Aspire.Microsoft.EntityFrameworkCore.Sqlite@9.8.0-preview.1.250926-0110
                    
#: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=CommunityToolkit.Aspire.Microsoft.EntityFrameworkCore.Sqlite&version=9.8.0-preview.1.250926-0110&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=CommunityToolkit.Aspire.Microsoft.EntityFrameworkCore.Sqlite&version=9.8.0-preview.1.250926-0110&prerelease
                    
Install as a Cake Tool

CommunityToolkit.Aspire.Microsoft.EntityFrameworkCore.Sqlite library

Register a DbContext in the DI container to interact with a SQLite database using Entity Framework Core.

Getting Started

Prerequisites

  • A DbContext
  • A SQLite database

Install the package

Install the .NET Aspire EF Core Sqlite library using the following command:

dotnet add package CommunityToolkit.Aspire.Microsoft.EntityFrameworkCore.Sqlite

Example usage

Option 1: Using IHostApplicationBuilder (Traditional Aspire Pattern)

In the Program.cs file of your project, call the AddSqliteDbContext<TDbContext> extension method to register the TDbContext implementation in the DI container. This method takes the connection name as a parameter:

builder.AddSqliteDbContext<BloggingContext>("sqlite");
Option 2: Using WebApplicationBuilder (New Simplified Pattern)

For ASP.NET Core applications, you can use the simplified EnrichSqliteDatabaseDbContext<TDbContext> extension method:

// Basic usage with default connection string name "DefaultConnection"
builder.EnrichSqliteDatabaseDbContext<BloggingContext>();

// With custom connection string name
builder.EnrichSqliteDatabaseDbContext<BloggingContext>("MyConnection");

// Disable OpenTelemetry instrumentation
builder.EnrichSqliteDatabaseDbContext<BloggingContext>(enableOpenTelemetry: false);

The EnrichSqliteDatabaseDbContext method provides:

  • Simplified API: Works directly with WebApplicationBuilder
  • Default connection string: Uses "DefaultConnection" by default
  • OpenTelemetry integration: Automatically adds EF Core instrumentation for distributed tracing
  • Parameter validation: Proper error handling for missing connection strings

Then, in your service, inject TDbContext and use it to interact with the database:

public class MyService(BloggingContext context)
{
    // ...
}

Additional documentation

Feedback & contributing

https://github.com/CommunityToolkit/Aspire

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

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.8.0-preview.1.250926-0110 49 9/26/2025
9.8.0-beta.399 50 9/26/2025
9.8.0-beta.398 55 9/25/2025
9.8.0-beta.397 56 9/25/2025
9.8.0-beta.395 61 9/24/2025
9.8.0-beta.394 64 9/23/2025
9.8.0-beta.393 66 9/23/2025
9.8.0-beta.392 61 9/23/2025
9.8.0-beta.389 244 9/18/2025
9.8.0-beta.388 249 9/16/2025
9.8.0-beta.386 199 9/15/2025
9.8.0-beta.385 193 9/15/2025
9.8.0-beta.384 47 9/13/2025
9.8.0-beta.376 123 9/8/2025
9.8.0-beta.375 54 9/6/2025
9.8.0-beta.373 135 9/5/2025
9.8.0-beta.372 127 9/4/2025
9.8.0-beta.370 117 9/2/2025
9.8.0-beta.364 118 9/1/2025
9.7.2 807 8/29/2025
9.7.2-beta.362 162 8/29/2025
9.7.2-beta.361 167 8/29/2025
9.7.2-beta.360 165 8/29/2025
9.7.2-beta.359 164 8/28/2025
9.7.2-beta.358 160 8/28/2025
9.7.2-beta.357 164 8/28/2025
9.7.1 292 8/27/2025
9.7.1-beta.355 163 8/27/2025
9.7.1-beta.354 168 8/27/2025
9.7.1-beta.353 162 8/27/2025
9.7.1-beta.352 165 8/27/2025
9.7.1-beta.351 164 8/27/2025
9.7.1-beta.348 130 8/14/2025
9.7.1-beta.344 79 8/10/2025
9.7.1-beta.343 194 8/8/2025
9.7.1-beta.342 202 8/7/2025
9.7.1-beta.341 197 8/6/2025
9.7.1-beta.340 187 8/5/2025
9.7.1-beta.339 183 8/5/2025
9.7.0 518 8/1/2025
9.7.0-beta.337 80 8/1/2025
9.7.0-beta.336 93 8/1/2025
9.7.0-beta.335 90 8/1/2025
9.7.0-beta.333 100 7/30/2025
9.6.1-beta.332 97 7/30/2025
9.6.1-beta.331 95 7/30/2025
9.6.1-beta.330 97 7/30/2025
9.6.1-beta.329 96 7/30/2025
9.6.1-beta.328 98 7/29/2025
9.6.1-beta.327 111 7/28/2025
9.6.1-beta.326 111 7/28/2025
9.6.0 1,250 7/10/2025
9.6.0-beta.324 127 7/10/2025
9.5.1-beta.323 119 7/10/2025
9.5.1-beta.322 120 7/10/2025
9.5.1-beta.321 122 7/10/2025
9.5.1-beta.320 123 7/9/2025
9.5.1-beta.319 128 7/8/2025
9.5.1-beta.318 127 7/2/2025
9.5.1-beta.317 120 6/30/2025
9.5.1-beta.315 131 6/26/2025
9.5.1-beta.314 122 6/23/2025
9.5.1-beta.313 130 6/20/2025
9.5.1-beta.312 114 6/20/2025
9.5.1-beta.311 124 6/18/2025
9.5.1-beta.310 122 6/17/2025
9.5.1-beta.309 125 6/17/2025
9.5.1-beta.308 125 6/17/2025
9.5.1-beta.307 127 6/16/2025
9.5.1-beta.306 268 6/11/2025
9.5.1-beta.305 99 6/7/2025
9.5.1-beta.304 124 6/6/2025
9.5.1-beta.303 132 6/4/2025
9.5.1-beta.302 132 6/4/2025
9.5.1-beta.301 126 6/2/2025
9.5.1-beta.300 130 5/28/2025
9.5.0 1,017 5/27/2025
9.5.0-beta.299 130 5/27/2025
9.5.0-beta.298 135 5/26/2025
9.5.0-beta.297 104 5/24/2025
9.5.0-beta.296 79 5/24/2025
9.5.0-beta.295 64 5/24/2025
9.4.1-beta.291 127 5/19/2025
9.4.1-beta.289 141 5/16/2025
9.4.1-beta.288 193 5/16/2025
9.4.1-beta.287 204 5/16/2025
9.4.1-beta.286 205 5/16/2025
9.4.1-beta.285 214 5/14/2025
9.4.1-beta.284 228 5/13/2025
9.4.1-beta.283 212 5/12/2025
9.4.1-beta.282 145 5/7/2025
9.4.1-beta.280 126 5/2/2025
9.4.1-beta.279 144 5/2/2025
9.4.1-beta.277 502 4/23/2025
9.4.1-beta.276 144 4/23/2025
9.4.1-beta.275 140 4/23/2025
9.4.1-beta.274 144 4/23/2025
9.4.1-beta.273 146 4/23/2025
9.4.1-beta.272 152 4/23/2025
9.4.1-beta.271 134 4/23/2025
9.4.1-beta.270 158 4/20/2025
9.4.0 435 4/20/2025
9.4.0-beta.269 154 4/20/2025
9.4.0-beta.268 136 4/20/2025
9.3.1-beta.267 151 4/20/2025
9.3.1-beta.266 80 4/19/2025
9.3.1-beta.265 178 4/15/2025
9.3.1-beta.264 162 4/15/2025
9.3.1-beta.263 167 4/15/2025
9.3.1-beta.262 172 4/15/2025
9.3.1-beta.260 902 4/10/2025
9.3.1-beta.259 157 4/8/2025
9.3.1-beta.258 158 4/8/2025
9.3.1-beta.257 146 4/8/2025
9.3.1-beta.256 140 4/8/2025
9.3.1-beta.255 152 4/8/2025
9.3.1-beta.254 142 4/8/2025
9.3.1-beta.253 152 4/1/2025
9.3.1-beta.252 118 3/27/2025
9.3.1-beta.250 131 3/27/2025
9.3.1-beta.249 120 3/27/2025
9.3.1-beta.248 136 3/27/2025
9.3.1-beta.247 115 3/27/2025
9.3.1-beta.244 468 3/25/2025
9.3.1-beta.242 468 3/24/2025
9.3.1-beta.241 134 3/19/2025
9.3.0 1,056 3/19/2025
9.3.0-beta.239 129 3/19/2025
9.2.2-beta.237 130 3/19/2025
9.2.2-beta.236 249 3/14/2025
9.2.2-beta.230 158 3/13/2025
9.2.2-beta.229 130 3/13/2025
9.2.2-beta.228 147 3/11/2025
9.2.2-beta.227 162 3/11/2025
9.2.2-beta.226 143 3/11/2025
9.2.2-beta.225 142 3/11/2025
9.2.2-beta.224 153 3/11/2025
9.2.2-beta.223 156 3/10/2025
9.2.2-beta.222 148 3/10/2025
9.2.2-beta.220 151 3/9/2025
9.2.2-beta.218 141 3/9/2025
9.2.2-beta.217 186 3/7/2025
9.2.2-beta.216 184 3/7/2025
9.2.2-beta.215 199 3/7/2025
9.2.2-beta.214 205 3/5/2025
9.2.2-beta.213 179 3/5/2025
9.2.2-beta.212 177 3/5/2025
9.2.2-beta.211 184 3/4/2025
9.2.2-beta.210 189 3/4/2025
9.2.2-beta.208 88 3/3/2025
9.2.1 650 3/3/2025
9.2.1-beta.207 102 3/2/2025
9.2.1-beta.206 76 3/1/2025
9.2.1-beta.205 80 2/27/2025
9.2.1-beta.204 72 2/26/2025
9.2.1-beta.203 76 2/26/2025
9.2.0 426 2/26/2025
9.2.0-beta.202 64 2/26/2025
9.2.0-beta.201 82 2/26/2025
9.2.0-beta.199 68 2/26/2025
9.2.0-beta.198 63 2/26/2025
9.1.1-beta.197 82 2/25/2025
9.1.1-beta.196 73 2/25/2025
9.1.1-beta.195 66 2/25/2025
9.1.1-beta.194 72 2/25/2025
9.1.1-beta.193 72 2/25/2025
9.1.1-beta.192 100 2/24/2025
9.1.1-beta.191 91 2/24/2025
9.1.1-beta.190 75 2/19/2025
9.1.1-beta.189 77 2/19/2025
9.1.1-beta.188 87 2/19/2025
9.1.1-beta.187 101 2/19/2025
9.1.1-beta.183 82 2/18/2025
9.1.1-beta.182 82 2/18/2025
9.1.1-beta.181 89 2/18/2025
9.1.1-beta.180 85 2/17/2025
9.1.1-beta.178 77 2/17/2025
9.1.1-beta.177 85 2/12/2025
9.1.1-beta.176 103 2/11/2025
9.1.1-beta.175 86 2/11/2025
9.1.1-beta.173 80 2/10/2025
9.1.1-beta.169 78 2/6/2025
9.1.1-beta.168 73 2/5/2025
9.1.1-beta.166 78 2/5/2025
9.1.1-beta.165 87 2/5/2025
9.1.1-beta.164 99 2/3/2025
9.1.1-beta.162 96 2/3/2025
9.1.1-beta.155 87 1/30/2025
9.1.1-beta.154 70 1/30/2025
9.1.1-beta.153 68 1/30/2025
9.1.1-beta.152 63 1/29/2025
9.1.1-beta.150 88 1/29/2025
9.1.1-beta.148 72 1/26/2025
9.1.1-beta.147 78 1/26/2025
9.1.1-beta.146 78 1/23/2025
9.1.1-beta.145 80 1/22/2025
9.1.1-beta.144 82 1/22/2025
9.1.1-beta.142 76 1/22/2025
9.1.1-beta.140 81 1/22/2025
9.1.1-beta.139 72 1/21/2025
9.1.1-beta.138 81 1/20/2025
9.1.1-beta.137 86 1/17/2025
9.1.1-beta.136 71 1/15/2025
9.1.1-beta.135 44 1/15/2025