SELECT [Id]
,[MemberId]
FROM [TestSet]
Where [MemberId] IS NULL
GO
一開始想到使用LinQ下列方式,結果是行不通的:
int? memberid= null;
var reasult = contex.TestSet.Where(s => s.MemberId == memberid);
似乎要直接在LinQ查詢語句中直接給null值判定才行:
var reasult = contex.TestSet.Where(s => s.MemberId == null);
沒有留言:
張貼留言