linq2db.EntityFrameworkCore
linq2db.EntityFrameworkCore copied to clipboard
Setting `BulkCopyOptions`
There doesn't seem to be a way to set BulkCopyTimeout for example, on the whole context, rather than per operation, non-globally. The only way to configure it seems to be setting a value for LinqToDBOptionsExtension on EF Core's IDbContextOptions, which seems to be the responsibility of UseLinqToDB.
Anyway, I suggest adding a configuration parameter to CreateLinqToDbContext for DataOptions to make configuration like that possible.
DataOptions already support bulk copy settings:
dataOptions.UseBulkCopyTimeout(123);
// or
dataOptions.BulkCopyOptions.WithBulkCopyTimeout(123);
DataOptionsalready support bulk copy settings:dataOptions.UseBulkCopyTimeout(123); // or dataOptions.BulkCopyOptions.WithBulkCopyTimeout(123);
Well yeah, but that doesn't actually change it. You have to reassign the options after. And you can't reassign it for IDataContext.
Those methods are pure.
You are not supposed to re-assign it. Check AddCustomOptions configuration extension example in readme
You are not supposed to re-assign it. Check
AddCustomOptionsconfiguration extension example in readme
Like I mentioned, that's global, aka per context type. It doesn't allow configuring it per context instance. That's what I said in this issue.
I see, we can add configuration delegete parameter to CreateLinqToDbContext APIs