Open douglasg14b opened 6 months ago
Quick question about the Postgres AppDbContext; you should not have to create your own db context (you're free to do it of course); could you maybe elaborate why you've gone down that route? Perhaps a misunderstanding that we should fix in some guide?
Hi!
This is just an existing DbContext in the application.
Elsa isn't configured to use it, Elsa is configured as:
elsa.UseWorkflowManagement(management =>
management.UseEntityFrameworkCore(ef => ef.UsePostgreSql(appConfig.DbConnectionString)));
elsa.UseWorkflowRuntime(runtime => runtime.UseEntityFrameworkCore(ef =>
ef.UsePostgreSql(appConfig.DbConnectionString)));
Got it. Thank you for the detailed feedback, I really appreciate it!
There are some significant onboarding gaps I experienced that the docs could alleviate
This is to just list these out.
The DbContextOptions passed to the AppDbContext constructor must be a DbContextOptions<AppDbContext>. When registering multiple DbContext types, make sure that the constructor for each context type has a DbContextOptions<TContext> parameter rather than a non-generic DbContextOptions parameter.
UseEntityFrameworkCore
need to ensure they include theef => ef.UsePostgreSql(appConfig.DbConnectionString)
configuration.Micrososft.EntityFrameworkCore.Design
you're going to have problems with theMicrosoft.CodeAnalysis.CSharp.Workspaces
dependency version becauseelsa
has it pinned as a specific versionfail: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1] An unhandled exception has occurred while executing the request. Swashbuckle.AspNetCore.SwaggerGen.SwaggerGeneratorException: Failed to generate Operation for action - HTTP: POST /elsa/api/identity/secrets/hash. See inner exception ---> Swashbuckle.AspNetCore.SwaggerGen.SwaggerGeneratorException: Failed to generate schema for type - Elsa. Identity.Endpoints.Secrets.Hash.Request. See inner exception ---> System.InvalidOperationException: Can't use schemaId "$Request" for type "$Elsa.Identity.Endpoints.Secr ets.Hash.Request". The same schemaId is already used for type "$Elsa.Identity.Endpoints.Users.Create.Request"
401 unauthorized
...Hangfire
you're going to have slight pain because the Elsa dependency is pinned to1.8.6
(Current is1.8.12
). (You'll need to explicitly install the version needed)Only use this feature if you are not configuring Hangfire yourself
If we are, is there any additional configuration Elsa needs?It's been
6h~11h trying to get this running on an existing application, this is brutal 😰