-
I am instrumenting an application based on EF with Aspire. The DbContexts of the application have constructors with non standard signature (either parameterless or with parameters that are not DbContextOptions and Aspire doesn't seem to like it very much.
As you can imagine from the log entry above, the application is using Duende's Identity Server to handle users. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Can you show the API you are using? Are you using the Enrich methods https://learn.microsoft.com/en-us/dotnet/aspire/whats-new/preview-4#new-enrich-methods? |
Beta Was this translation helpful? Give feedback.
-
I was using the classic builder.AddSqlServerDbContext<IdentityServerConfigurationContext>("Database", ConfigureSqlServerSettings, ConfigureDbContextOptions);
static void ConfigureDbContextOptions(DbContextOptionsBuilder builder)
{
builder.UseSqlServer(sql => sql.MigrationsAssembly(MigrationAssemblyName).EnableRetryOnFailure());
}
static void ConfigureSqlServerSettings(MicrosoftEntityFrameworkCoreSqlServerSettings settings)
{
} I knew about the new Thanks a lot! |
Beta Was this translation helpful? Give feedback.
Can you show the API you are using? Are you using the Enrich methods https://learn.microsoft.com/en-us/dotnet/aspire/whats-new/preview-4#new-enrich-methods?