我有以下查詢這對我的作品:添加動態SQL查詢來QueryOver
IList<info> result =
QueryOver<info>()
.Where(row => row.Timestamp >= fromDate)
.And(row => row.Timestamp <= toDate)
.OrderBy(row => row.Timestamp).Asc
.Skip(startRow).Take(count).List();
我需要從客戶端的另外SQL查詢字符串獲取並將其添加到我的查詢,如下所示,以擴展它:
IList<info> result =
QueryOver<info>()
.Where(row => row.Timestamp >= fromDate)
.And(queryString)
.And(row => row.Timestamp <= toDate)
.OrderBy(row => row.Timestamp).Asc
.Skip(startRow).Take(count).List();
string queryString = "AND name='haim' And number=1"
是否有可能添加QueryOver動態查詢字符串?
你爲什麼要這樣做? – Phill 2013-04-21 10:09:07