dotnet-spanner-entity-framework
dotnet-spanner-entity-framework copied to clipboard
Save update in a Decimal property - cast error to SpannerNumeric
Environment details
- Programming language: C# netcore 6
- OS: win10
- Language runtime version: netcore6
- Package version: 2.1.3
Steps to reproduce
- Using EF create a class with a property decimal
- update-database
- create 1 record
- recover the value of that record and update any other property
- await context.SavechangesAsync()
exception message: Unable to cast object of type 'System.Decimal' to type 'Google.Cloud.Spanner.V1.SpannerNumeric'.
####Error stacktrace at Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer`1.Equals(Object left, Object right) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.ChangeDetector.DetectValueChange(InternalEntityEntry entry, IProperty property) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.ChangeDetector.LocalDetectChanges(InternalEntityEntry entry) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.ChangeDetector.DetectChanges(IStateManager stateManager) at Microsoft.EntityFrameworkCore.DbContext.<SaveChangesAsync>d__60.MoveNext() at Inpro_Models.Repositories.EcommerceOrderREP.<UpdateStatus>d__1.MoveNext() in D:\Codes\InovarPro\WebServices\Inpro WebServices\Inpro_Models\Repositories\EcommerceOrderREP.cs:line 41