1

我編程設置Where子句在EntityDataSource像這樣:LINQ-to-Entities哪裏有OR條件的子句?

edsCheckListEntities.Where = "not it.business_done" 

不幸的是,這不趕任何空值,這也「不這樣做」,所以我嘗試了以下內容:

edsCheckListEntities.Where = "it.business_done is nothing or not it.business_done" 

但是這會引發錯誤。有沒有辦法在實體數據源where子句中這樣做一個OR?

回答

2

懷疑你只是想用"is null"而不是「什麼」:

edsCheckListEntities.Where = "it.business_done is null or not it.business_done" 

(我沒有使用任何實體SQL,但我只是從文檔中去。)

+0

好吧,那很容易。謝謝。 – davemackey

+0

@davemackey:酷 - 很高興它工作:) –