2010-09-02 97 views
-1

如何防止空值的Linq中防止空值的迴歸

+2

回報,你需要更具體一點。在運行哪個命令時?你想做什麼,這不工作? – 2010-09-02 10:48:13

+0

我會說**很多**更具體... – 2010-09-02 10:50:30

+0

當db服務器重新運行null值我怎麼能防止,我的意思是在T-Sql Ex:Isnull(CustomerID,'')/ Isnull(UnitPrice,0 )但我如何使用LINQ到SQL – Suhaibnm 2010-09-02 10:52:25

回答

0
var noNulls = from someImaginaryItem in someImaginaryCollection 
       where someImaginaryItem.SomeImaginaryNullableProperty != null 
       select someImaginaryItem;