LINQ In & Not In
-- 正向 IN 查詢 SELECT * FROM CITYDATA WHERE CITY IN ('TP', 'KH') -- 反向 IN 查詢 SELECT * FROM CITYDATA WHERE NOT CITY IN ('TP', 'KH')
// 正向 IN 查詢 var TB = FROM CD IN CITYDATA WHERE (New String() {"TP", "TW"}).Contains(cd.City) SELECT CD; // 反向 IN 查詢 var TB = FROM CD IN CITYDATA WHERE Not (New String() {"TP", "TW"}).Contains(cd.City) SELECT CD;
留言
張貼留言