启用版本控制 和 Tracking(_model) 提示 Failed to convert parameter 返回
SqlSugarCore 5.1.3.50
SqlSugar.SqlSugarScope
数据库sqlserver,版本号字段是ver,类型是guid,
第一步 _dbInstance.Tracking(_model)
第二步:_dbInstance.UpdateableWithAttr(_model).ExecuteCommandWithOptLock(true);
执行会提示:
System.InvalidCastException
HResult=0x80004002
Message=Failed to convert parameter value from a Guid to a String.
Source=SqlSugar
StackTrace:
在 SqlSugar.AdoProvider.ExecuteCommand(String sql, SugarParameter[] parameters)
在 SqlSugar.UpdateableProvider`1.ExecuteCommand()
在 SqlSugar.UpdateableProvider`1.ExecuteCommandWithOptLock(Boolean IsVersionValidation)
内部异常 1:
InvalidCastException: Object must implement IConvertible.