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
"Unable to cast object of type 'System.Int32' to type 'System.DateTime'." in
at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.d__4.MoveNext()
at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.d__2.MoveNext()
at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.d__50.MoveNext()
at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.d__50.MoveNext()
at Microsoft.EntityFrameworkCore.SqlServer.Update.Internal.SqlServerModificationCommandBatch.d__15.MoveNext()
at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.d__9.MoveNext()
at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.d__9.MoveNext()
at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.d__9.MoveNext()
at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.d__111.MoveNext()
at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.d__115.MoveNext()
at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.d__7`2.MoveNext()
at Microsoft.EntityFrameworkCore.DbContext.d__63.MoveNext()
at Microsoft.EntityFrameworkCore.DbContext.d__63.MoveNext()
If I remove code in context file (shown above) update works.
The text was updated successfully, but these errors were encountered:
can you try latest EF 9 preview? We have done a large refactoring to how migrations deal with temporal tables, which fixes a lot of bugs in the area - #32239
EF Team Triage: Closing this issue as the requested additional details have not been provided and we have been unable to reproduce it.
BTW this is a canned response and may have info or details that do not directly apply to this particular issue. While we'd like to spend the time to uniquely address every incoming issue, we get a lot traffic on the EF projects and that is not practical. To ensure we maximize the time we have to work on fixing bugs, implementing new features, etc. we use canned responses for common triage decisions.
Hi
Microsoft.EntityFrameworkCore: 8.0.3
Microsoft.EntityFrameworkCore.SqlServer: 8.0.3
I use EF Core Power Tools with Reverse Engineer.
My MS SQL db table has system versioning on. Data table and historical table have equals columns.
Autogenereted context has this:
When I try update row i see error:
"Unable to cast object of type 'System.Int32' to type 'System.DateTime'." in
at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.d__4.MoveNext()
at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.d__2.MoveNext()
at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.d__50.MoveNext()
at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.d__50.MoveNext()
at Microsoft.EntityFrameworkCore.SqlServer.Update.Internal.SqlServerModificationCommandBatch.d__15.MoveNext()
at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.d__9.MoveNext()
at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.d__9.MoveNext()
at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.d__9.MoveNext()
at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.d__111.MoveNext()
at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.d__115.MoveNext()
at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.d__7`2.MoveNext()
at Microsoft.EntityFrameworkCore.DbContext.d__63.MoveNext()
at Microsoft.EntityFrameworkCore.DbContext.d__63.MoveNext()
If I remove code in context file (shown above) update works.
The text was updated successfully, but these errors were encountered: