You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Enriches a <see cref="IHostApplicationBuilder"/> to register the <typeparamref name="TDbContext"/> as a scoped service
75
+
/// with simplified configuration and optional OpenTelemetry instrumentation.
76
+
/// </summary>
77
+
/// <typeparam name="TDbContext">The type of the <see cref="DbContext"/>.</typeparam>
78
+
/// <param name="builder">The <see cref="IHostApplicationBuilder"/> to read config from and add services to.</param>
79
+
/// <param name="configureSettings">An optional delegate that can be used for customizing options. It's invoked after the settings are read from the configuration.</param>
80
+
/// <exception cref="ArgumentNullException">Thrown if mandatory <paramref name="builder"/> is null.</exception>
Copy file name to clipboardExpand all lines: src/CommunityToolkit.Aspire.Microsoft.EntityFrameworkCore.Sqlite/CommunityToolkit.Aspire.Microsoft.EntityFrameworkCore.Sqlite.csproj
#### Option 1: Using IHostApplicationBuilder (Traditional Aspire Pattern)
23
+
22
24
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:
0 commit comments