我想操縱從我的數據庫中的數據轉換它列出前一個長長的清單選擇將其綁定前處理數據
我有下面的代碼從我的數據庫獲取所需的數據結合C#的Windows Phone
var tdr =
from p in ctx.Transactions
join c in ctx.Type on p.Type equals c.Id
where p.Date > DateTime.Today.AddDays(-1 * ra) && c.Type1.Equals(ty)
orderby p.Date descending
select new { Id = p.Id
, amont = p.Amont
, type = p.Type
, des = p.Des
, dated =p.Date
, Aid=p.Acc
};
我想使用的功能結合之前改變一些值它
list32.ItemsSource = tdr.ToList();
我試圖改變查詢這樣的事情,但它沒有工作
select new { Id = p.Id
, amont = p.Amont
, type = p.Type
, des = p.Des
, ***dated =somefunction(p.Date)***
, Aid=p.Acc };
任何幫助表示讚賞
感謝
到底是什麼問題?什麼是錯誤信息?什麼是數據源(ctx.Transactions) - 對象集合,EF DataSet ...? – 2014-11-05 09:14:03
在System.Data.Linq.ni.dll中發生類型'System.NotSupportedException'的異常,但未在用戶代碼中處理 附加信息:方法'System.String ToString(System.String)'不支持轉換爲SQL。 – Raminhz 2014-11-05 09:33:31