-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Right now, extensive usage of scoped ApplicationDbContext in the blazor server UI causes circuits to be kept alive for a very long time.
To reduce that, all direct usages in the UI must be replaced with IDbContextFactory-constructed instance usages. All usages by UI-facing services (including those used transitively) must lose that dependency as well, so they should receive the context to use as a method parameter. If an internal usage is absolutely necessary (for example for parallelization), make sure that those instances have their changes saved as well and afterwards the new data gets loaded outside.
You also have to update the tests then to supply that factory to tests that need them. Please supply a proper factory on that point.
The factory itself is already registered in MangaIngestWithUpscaling/Program.cs, so you can just make use of it.