SqlServer Timestamp数据类型:Unable to cast object of type 'System.Byte[]' to type 'System.DateTime
Microsoft.EntityFrameworkCore.DbUpdateException:“An error occurred while saving the entity changes. See the inner exception for details.”
内部异常:
SqlServer Timestamp数据类型:Unable to cast object of type 'System.Byte[]' to type 'System.DateTime
解决方案
_Timestamp字段定义的是Timestamp数据类型,实体模型必须定义为byte[]
C# 全选
public Byte[]? _Timestamp { get; set; }
版权声明:本文为开发框架文库发布内容,转载请附上原文出处连接
NewDoc C/S框架网