Subsonic 尝试将时间跨度转换为字符串时出错 [英] Error with Subsonic attempting to convert Timespan to String

查看:33
本文介绍了Subsonic 尝试将时间跨度转换为字符串时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 MS SQL 2008 (10.0.2531) 中使用 Subsonic v3.0.0.3 并在表日期"和时间"中有两列(不是 DateTime 列)以及 ActiveRecord SingleOrDefault(第 14110 行)尝试加载对象(通过给定的 pkid)抛出此错误;

using Subsonic v3.0.0.3 with MS SQL 2008 (10.0.2531) and have two columns in a table 'Date' and 'Time' (not DateTime columns) and when the ActiveRecord SingleOrDefault (line 14110) attempts to load the object (via a given pkid) this error is thrown;

"Object of type 'System.TimeSpan' cannot be converted to type 'System.String'."

知道如何解决这个问题吗?让我感到困惑的部分是 MS SQL 没有时间跨度"列类型.

Any idea on how to work around this? The part that fuzzles me is MS SQL doesn't have a 'Timespan' column type.

推荐答案

SubSonic 3 当前不支持日期和时间列类型

Date and Time column types are not currently supported in SubSonic 3

这篇关于Subsonic 尝试将时间跨度转换为字符串时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆