Skip to content

Commit 1a0fb78

Browse files
renemadsenclaude
andcommitted
fix(plugins): pool per-plugin DbContext
Switch AddDbContext<T> to AddDbContextPool<T> to amortize DbContext allocation and connection acquisition across requests. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 9fb09a9 commit 1a0fb78

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/EformTimePlanningPlugin.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ public void ConfigureDbContext(IServiceCollection services, string connectionStr
178178

179179
_connectionString = connectionString;
180180
services.AddSingleton<ITimePlanningDbContextHelper>(provider => new TimePlanningDbContextHelper(_connectionString));
181-
services.AddDbContext<TimePlanningPnDbContext>(o =>
181+
services.AddDbContextPool<TimePlanningPnDbContext>(o =>
182182
o.UseMySql(connectionString, new MariaDbServerVersion(
183183
ServerVersion.AutoDetect(connectionString)), mySqlOptionsAction: builder =>
184184
{

0 commit comments

Comments
 (0)