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