4
如果我想用linq生成查詢(month(created) = 1 and year(created) = 2010) or (month(modified) = 1 and year(modified) = 2010)
,我該如何去解決它?LINQ to SQL中的括號表達式
我有o.Created.Value.Month == month && o.Created.Value.Year == year
。如果我做(o.Created.Value.Month == month && o.Created.Value.Year == year) || (o.Modified.Value.Month == month && o.Modified.Value.Year == year)
不會忽略括號嗎?
謝謝,這樣做的工作(儘管使用了CONVERT而不是MONTH,但返回的結果仍然相同) – SamWM