CommunityToolkit.Aspire.Microsoft.EntityFrameworkCore.Sqlite 13.0.0-beta.436

Prefix Reserved
This is a prerelease version of CommunityToolkit.Aspire.Microsoft.EntityFrameworkCore.Sqlite.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package CommunityToolkit.Aspire.Microsoft.EntityFrameworkCore.Sqlite --version 13.0.0-beta.436
                    
NuGet\Install-Package CommunityToolkit.Aspire.Microsoft.EntityFrameworkCore.Sqlite -Version 13.0.0-beta.436
                    
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="13.0.0-beta.436" />
                    
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="13.0.0-beta.436" />
                    
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 13.0.0-beta.436
                    
#r "nuget: CommunityToolkit.Aspire.Microsoft.EntityFrameworkCore.Sqlite, 13.0.0-beta.436"
                    
#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@13.0.0-beta.436
                    
#: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=13.0.0-beta.436&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=CommunityToolkit.Aspire.Microsoft.EntityFrameworkCore.Sqlite&version=13.0.0-beta.436&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
13.0.0-preview.1.251125-0314 38 11/25/2025
13.0.0-beta.462 41 11/25/2025
13.0.0-beta.456 48 11/23/2025
13.0.0-beta.454 42 11/23/2025
13.0.0-beta.453 64 11/22/2025
13.0.0-beta.450 74 11/22/2025
13.0.0-beta.448 69 11/22/2025
13.0.0-beta.444 333 11/17/2025
13.0.0-beta.443 253 11/17/2025
13.0.0-beta.440 94 11/15/2025
13.0.0-beta.439 230 11/12/2025
13.0.0-beta.438 216 11/12/2025
13.0.0-beta.436 217 11/12/2025
13.0.0-beta.435 224 11/11/2025
13.0.0-beta.433 142 11/10/2025
13.0.0-beta.432 144 11/10/2025
13.0.0-beta.431 131 11/6/2025
13.0.0-beta.430 127 11/6/2025
9.9.0-preview.1.251103-2303 133 11/3/2025
9.9.0-beta.427 132 11/3/2025
9.8.1-beta.426 138 11/3/2025
9.8.1-beta.424 139 10/28/2025
9.8.1-beta.420 127 10/27/2025
9.8.1-beta.419 119 10/27/2025
9.8.1-beta.417 126 10/27/2025
9.8.1-beta.414 123 10/24/2025
9.8.1-beta.413 119 10/22/2025
9.8.1-beta.410 129 10/16/2025
9.8.1-beta.408 110 10/16/2025
9.8.1-beta.407 111 10/16/2025
9.8.1-beta.406 123 10/15/2025
9.8.0-preview.1.250926-0110 260 9/26/2025
9.8.0-beta.405 119 10/15/2025
9.8.0-beta.404 122 10/13/2025
9.8.0-beta.402 126 9/29/2025
9.8.0-beta.401 121 9/29/2025
9.8.0-beta.399 119 9/26/2025
9.8.0-beta.398 130 9/25/2025
9.8.0-beta.397 131 9/25/2025
9.8.0-beta.395 128 9/24/2025
9.8.0-beta.394 131 9/23/2025
9.8.0-beta.393 130 9/23/2025
9.8.0-beta.392 127 9/23/2025
9.8.0-beta.389 254 9/18/2025
9.8.0-beta.388 257 9/16/2025
9.8.0-beta.386 207 9/15/2025
9.8.0-beta.385 200 9/15/2025
9.8.0-beta.384 55 9/13/2025
9.8.0-beta.376 134 9/8/2025
9.8.0-beta.375 60 9/6/2025
9.8.0-beta.373 141 9/5/2025
9.8.0-beta.372 134 9/4/2025
9.8.0-beta.370 128 9/2/2025
9.8.0-beta.364 127 9/1/2025
9.7.2 3,129 8/29/2025
9.7.2-beta.362 169 8/29/2025
9.7.2-beta.361 177 8/29/2025
9.7.2-beta.360 172 8/29/2025
9.7.2-beta.359 171 8/28/2025
9.7.2-beta.358 169 8/28/2025
9.7.2-beta.357 171 8/28/2025
9.7.1 319 8/27/2025
9.7.1-beta.355 171 8/27/2025
9.7.1-beta.354 181 8/27/2025
9.7.1-beta.353 171 8/27/2025
9.7.1-beta.352 172 8/27/2025
9.7.1-beta.351 171 8/27/2025
9.7.1-beta.348 145 8/14/2025
9.7.1-beta.344 96 8/10/2025
9.7.1-beta.343 202 8/8/2025
9.7.1-beta.342 208 8/7/2025
9.7.1-beta.341 207 8/6/2025
9.7.1-beta.340 195 8/5/2025
9.7.1-beta.339 190 8/5/2025
9.7.0 604 8/1/2025
9.7.0-beta.337 87 8/1/2025
9.7.0-beta.336 99 8/1/2025
9.7.0-beta.335 98 8/1/2025
9.7.0-beta.333 105 7/30/2025
9.6.1-beta.332 107 7/30/2025
9.6.1-beta.331 102 7/30/2025
9.6.1-beta.330 105 7/30/2025
9.6.1-beta.329 103 7/30/2025
9.6.1-beta.328 114 7/29/2025
9.6.1-beta.327 120 7/28/2025
9.6.1-beta.326 120 7/28/2025
9.6.0 1,474 7/10/2025
9.6.0-beta.324 134 7/10/2025
9.5.1-beta.323 125 7/10/2025
9.5.1-beta.322 125 7/10/2025
9.5.1-beta.321 127 7/10/2025
9.5.1-beta.320 131 7/9/2025
9.5.1-beta.319 132 7/8/2025
9.5.1-beta.318 130 7/2/2025
9.5.1-beta.317 125 6/30/2025
9.5.1-beta.315 137 6/26/2025
9.5.1-beta.314 126 6/23/2025
9.5.1-beta.313 145 6/20/2025
9.5.1-beta.312 122 6/20/2025
9.5.1-beta.311 129 6/18/2025
9.5.1-beta.310 132 6/17/2025
9.5.1-beta.309 130 6/17/2025
9.5.1-beta.308 131 6/17/2025
9.5.1-beta.307 134 6/16/2025
9.5.1-beta.306 274 6/11/2025
9.5.1-beta.305 104 6/7/2025
9.5.1-beta.304 141 6/6/2025
9.5.1-beta.303 135 6/4/2025
9.5.1-beta.302 135 6/4/2025
9.5.1-beta.301 131 6/2/2025
9.5.1-beta.300 140 5/28/2025
9.5.0 1,085 5/27/2025
9.5.0-beta.299 132 5/27/2025
9.5.0-beta.298 139 5/26/2025
9.5.0-beta.297 116 5/24/2025
9.5.0-beta.296 83 5/24/2025
9.5.0-beta.295 82 5/24/2025
9.4.1-beta.291 133 5/19/2025
9.4.1-beta.289 145 5/16/2025
9.4.1-beta.288 197 5/16/2025
9.4.1-beta.287 215 5/16/2025
9.4.1-beta.286 215 5/16/2025
9.4.1-beta.285 220 5/14/2025
9.4.1-beta.284 246 5/13/2025
9.4.1-beta.283 216 5/12/2025
9.4.1-beta.282 160 5/7/2025
9.4.1-beta.280 129 5/2/2025
9.4.1-beta.279 161 5/2/2025
9.4.1-beta.277 524 4/23/2025
9.4.1-beta.276 150 4/23/2025
9.4.1-beta.275 146 4/23/2025
9.4.1-beta.274 164 4/23/2025
9.4.1-beta.273 155 4/23/2025
9.4.1-beta.272 172 4/23/2025
9.4.1-beta.271 139 4/23/2025
9.4.1-beta.270 161 4/20/2025
9.4.0 471 4/20/2025
9.4.0-beta.269 166 4/20/2025
9.4.0-beta.268 140 4/20/2025
9.3.1-beta.267 164 4/20/2025
9.3.1-beta.266 99 4/19/2025
9.3.1-beta.265 184 4/15/2025
9.3.1-beta.264 166 4/15/2025
9.3.1-beta.263 170 4/15/2025
9.3.1-beta.262 178 4/15/2025
9.3.1-beta.260 922 4/10/2025
9.3.1-beta.259 173 4/8/2025
9.3.1-beta.258 173 4/8/2025
9.3.1-beta.257 152 4/8/2025
9.3.1-beta.256 146 4/8/2025
9.3.1-beta.255 169 4/8/2025
9.3.1-beta.254 146 4/8/2025
9.3.1-beta.253 172 4/1/2025
9.3.1-beta.252 125 3/27/2025
9.3.1-beta.250 148 3/27/2025
9.3.1-beta.249 123 3/27/2025
9.3.1-beta.248 155 3/27/2025
9.3.1-beta.247 118 3/27/2025
9.3.1-beta.244 471 3/25/2025
9.3.1-beta.242 474 3/24/2025
9.3.1-beta.241 138 3/19/2025
9.3.0 1,074 3/19/2025
9.3.0-beta.239 132 3/19/2025
9.2.2-beta.237 136 3/19/2025
9.2.2-beta.236 272 3/14/2025
9.2.2-beta.230 180 3/13/2025
9.2.2-beta.229 139 3/13/2025
9.2.2-beta.228 153 3/11/2025
9.2.2-beta.227 180 3/11/2025
9.2.2-beta.226 151 3/11/2025
9.2.2-beta.225 158 3/11/2025
9.2.2-beta.224 170 3/11/2025
9.2.2-beta.223 174 3/10/2025
9.2.2-beta.222 154 3/10/2025
9.2.2-beta.220 155 3/9/2025
9.2.2-beta.218 146 3/9/2025
9.2.2-beta.217 193 3/7/2025
9.2.2-beta.216 203 3/7/2025
9.2.2-beta.215 218 3/7/2025
9.2.2-beta.214 224 3/5/2025
9.2.2-beta.213 198 3/5/2025
9.2.2-beta.212 183 3/5/2025
9.2.2-beta.211 188 3/4/2025
9.2.2-beta.210 195 3/4/2025
9.2.2-beta.208 101 3/3/2025
9.2.1 707 3/3/2025
9.2.1-beta.207 106 3/2/2025
9.2.1-beta.206 81 3/1/2025
9.2.1-beta.205 88 2/27/2025
9.2.1-beta.204 78 2/26/2025
9.2.1-beta.203 82 2/26/2025
9.2.0 696 2/26/2025
9.2.0-beta.202 68 2/26/2025
9.2.0-beta.201 101 2/26/2025
9.2.0-beta.199 75 2/26/2025
9.2.0-beta.198 70 2/26/2025
9.1.1-beta.197 87 2/25/2025
9.1.1-beta.196 78 2/25/2025
9.1.1-beta.195 72 2/25/2025
9.1.1-beta.194 77 2/25/2025
9.1.1-beta.193 78 2/25/2025
9.1.1-beta.192 118 2/24/2025
9.1.1-beta.191 113 2/24/2025
9.1.1-beta.190 79 2/19/2025
9.1.1-beta.189 84 2/19/2025
9.1.1-beta.188 104 2/19/2025
9.1.1-beta.187 122 2/19/2025
9.1.1-beta.183 89 2/18/2025
9.1.1-beta.182 86 2/18/2025
9.1.1-beta.181 93 2/18/2025
9.1.1-beta.180 89 2/17/2025
9.1.1-beta.178 83 2/17/2025
9.1.1-beta.177 88 2/12/2025
9.1.1-beta.176 123 2/11/2025
9.1.1-beta.175 93 2/11/2025
9.1.1-beta.173 86 2/10/2025
9.1.1-beta.169 84 2/6/2025
9.1.1-beta.168 76 2/5/2025
9.1.1-beta.166 85 2/5/2025
9.1.1-beta.165 103 2/5/2025
9.1.1-beta.164 118 2/3/2025
9.1.1-beta.162 110 2/3/2025
9.1.1-beta.155 90 1/30/2025
9.1.1-beta.154 80 1/30/2025
9.1.1-beta.153 71 1/30/2025
9.1.1-beta.152 72 1/29/2025
9.1.1-beta.150 106 1/29/2025
9.1.1-beta.148 77 1/26/2025
9.1.1-beta.147 85 1/26/2025
9.1.1-beta.146 85 1/23/2025
9.1.1-beta.145 96 1/22/2025
9.1.1-beta.144 96 1/22/2025
9.1.1-beta.142 83 1/22/2025
9.1.1-beta.140 97 1/22/2025
9.1.1-beta.139 77 1/21/2025
9.1.1-beta.138 94 1/20/2025
9.1.1-beta.137 100 1/17/2025
9.1.1-beta.136 75 1/15/2025
9.1.1-beta.135 50 1/15/2025