subsonic 3 - “System.Byte[]"类型的对象无法转换为“System.String"类型 [英] subsonic 3 - Object of type 'System.Byte[]' cannot be converted to type 'System.String'
本文介绍了subsonic 3 - “System.Byte[]"类型的对象无法转换为“System.String"类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一段在 subsonic 2.2 中运行良好的代码,我迁移到了 subsonic 3但现在我收到此错误无法将System.Byte[]"类型的对象转换为System.String"类型.评论中的 subsonic 2.2 代码
I have this piece of code that works fine in subsonic 2.2, I migrated to subsonic 3 but now i get this error 'Object of type 'System.Byte[]' cannot be converted to type 'System.String'.' subsonic 2.2 code in comment
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();
}
}
TypeId 和 ItemId 为 int这怎么解决?
Where TypeId and ItemId are int how can this be fixed ?
推荐答案
我正在使用 3.0.0.0
i'm using 3.0.0.0
错误类似
在 SQLServer.ttinclude 中,缺少 sql 类型时间戳"
in SQLServer.ttinclude, missing sql type "timestamp"
你看到的地方
string GetSysType(string sqlType){
...
case "image":
case "binary":
case "varbinary":
sysType= "byte[]";
break;
...
}
改为字符串 GetSysType(字符串 sqlType){...
change to string GetSysType(string sqlType){ ...
case "image":
case "binary":
case "varbinary":
case "timestamp":
sysType= "byte[]";
break;
...
}
这篇关于subsonic 3 - “System.Byte[]"类型的对象无法转换为“System.String"类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文