-
Notifications
You must be signed in to change notification settings - Fork 59
Closed
Description
[Using Z.EntityFramework.Extensions.EFCore 9.103.9.3]
When using the following code fragment to insert data into multiple tables:
var result = await _dbContext.BulkInsertOptimizedAsync(data);
_logger.LogInformation("IsOptimized: {IsOptimized}, Tips: {Tips}", result.IsOptimized, result.TipsText);we see many log lines where the query result is reporting "IsOptimized: true", but for one particular table it results in the following exception on the _logger.LogInformation line:
System.InvalidOperationException: Nullable object must have a value.
at System.Nullable`1.get_Value()
at Z.EntityFramework.Extensions.BulkOptimizedAnalysis.get_IsOptimized()
(...)
This is what I see in the debugger when I inspect the result value:

I'm unsure what kind of obfuscation is going on here, but it's even more mysterious how a non-nullable boolean can throw this specific exception.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels