79832626

Date: 2025-11-28 14:05:16
Score: 1.5
Natty:
Report link

Hi heaxyh,

by increasing the CommandTimeout you will prevent the timeout and consequently the lock on __EFMigrations table. This timeout increases the time on the transaction itself

services.AddDbContext<XContext>((srv, options) =>
{
            options.UseSqlServer("ConnectionString", opts => { opts.MigrationsAssembly("MigrationProject"); opts.CommandTimeout(appSettings.CommandTimeoutInSeconds);});
});

kind regards,

Reasons:
  • Blacklisted phrase (1): regards
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Pau No spam