0
好像OrmLite平原选择扩展方法(Select<T>
)试图格式化查询字符串(如SelectFmt<T>
),所以它如果查询字符串包含大括号,它假定引发错误缺少参数。花括号抛出错误
例子查询:
错误抛出:
Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
理想的情况下,Select<T>
应该只执行查询一字不差,无任何字符串格式化。
这是OrmLite中的错误还是别的?
更新:看起来像问题是here in OrmLiteDialectProviderBase class。它应该有PARAMS长度等
谢谢,那有效。任何计划改变'选择'没有参数行为更像'SqlList '? –
Nick
@Nick'SqlList'中没有任何行为,它通过OrmLite预处理来存在,但是SqlFmt现在会将空params [从此提交]短路(https://github.com/ServiceStack/ServiceStack.OrmLite/commit/57697b9c2b8cf5438cf96d3e88fc63b54119e0d2)此更改可从v4.0.53 [现在位于MyGet](https://github.com/ServiceStack/ServiceStack/wiki/MyGet) –
mythz