Subsonic 亚音速3-类型为'的物体;字节[]和#x27;无法转换为类型';System.String';
我有一段代码在亚音速2.2中运行良好,我迁移到亚音速3 但现在我得到这个错误“类型为”System.Byte[]”的对象不能转换为“System.String”类型 注释中的亚音速2.2代码Subsonic 亚音速3-类型为'的物体;字节[]和#x27;无法转换为类型';System.String';,subsonic,Subsonic,我有一段代码在亚音速2.2中运行良好,我迁移到亚音速3 但现在我得到这个错误“类型为”System.Byte[]”的对象不能转换为“System.String”类型 注释中的亚音速2.2代码 public IList<Tag> Tags { get { return Tag.Find(t => t.TypeId == 1 && t.ItemID == JobId).ToList(); // new TagColle
public IList<Tag> Tags
{
get
{
return Tag.Find(t => t.TypeId == 1 && t.ItemID == JobId).ToList();
// new TagCollection().Where(Tag.Columns.TypeId, 1)
// .Where(Tag.Columns.ItemID, JobId).Load();
}
}
公共IList标记
{
得到
{
return Tag.Find(t=>t.TypeId==1&&t.ItemID==JobId.ToList();
//新建TagCollection().Where(Tag.Columns.TypeId,1)
//.Where(Tag.Columns.ItemID,JobId).Load();
}
}
其中TypeId和ItemId是int
如何解决此问题?您是否使用最新版本(3.0.0.1),您报告的内容与以下内容非常相似: 还有,您使用的是哪个数据库?我使用的是3.0.0.0 错误是相似的 在SQLServer.t目录中,缺少sql类型“timestamp” 你看到的地方
string GetSysType(string sqlType){
...
case "image":
case "binary":
case "varbinary":
sysType= "byte[]";
break;
...
}
改为
字符串GetSysType(字符串sqlType){
我遇到了同样的问题,但是需要将以下案例添加到MySQL.t包含模板中:
case "image":
case "binary":
case "varbinary":
--> case "longblob": <--
sysType= "byte[]";
break;
案例“图像”:
“二进制”情况:
案例“varbinary”:
-->案例“longblob”:
case "image":
case "binary":
case "varbinary":
--> case "longblob": <--
sysType= "byte[]";
break;