You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the BulkReadAsync() method, data with pre-existing records in the database exhibits a zero value for the identity column in query outcomes.
#1468
Open
CalmlyCC opened this issue
Apr 22, 2024
· 0 comments
Technical context: Running on .NET 5.0 with EFCore.BulkExtensions version 5.4.2 against a SQL Server 2014 database.
Issue description: Despite the presence of existing data in the database, when employing the BulkReadAsync() function, the identity field's value is returned as zero in the fetched results.
Steps to reproduce:
Execute a query to retrieve an existing record containing a decimal-type property.
The schema of the table under consideration defines a decimal field with specifications of decimal(18,2).
Example dataset: The same numerical value is represented internally in C# as 10.3 and externally in the database as 10.30.
Expected behavior: The expected behavior would be for the query to correctly retrieve and display the actual identity field value for such existing records.
Observed behavior: However, the identity field in the returned query results unexpectedly contains a value of zero.
Tentative cause speculation (optional): One possible hypothesis is that during the execution of the GetUniquePropertyValues() method, numeric values may be inadvertently stringified through a conversion to strings by means of ToString(), which could lead to incorrect handling or representation of identity values. uniqueBuilder.Append(property?.ToString() ?? "null");
The text was updated successfully, but these errors were encountered:
Content:
uniqueBuilder.Append(property?.ToString() ?? "null");
The text was updated successfully, but these errors were encountered: