-1
我不明白這個語法有什麼問題。Linq查詢與包含int列表的方法在哪裏條件
tags="abc,xyz,asdf"
List<string> ta= tags.Split(',').ToList<string>();
List<string> demo = from T in db.tokens where ta.Contains(T.tname) select T.Id;
我有表標籤和它們的ID在它。我需要獲取標籤的ID從表... 謝謝
編輯:: 我已經把它改成像this.And其工作,另一個問題
List<int> demo = from T in db.tokens where ta.Contains(T.tname) select T.Id).ToList();
var slist = from I in db.institutes
from T in db.inst_to_token
where I.CountryId == cont
&& demo.Contains(T.tokenid)
select I;
但上面是示出此錯誤在其中條件
爲System.collection.generic.List.Contains(INT)的最佳重載的方法匹配具有一些無效參數
'T.Id'是什麼類型?它是一個字符串嗎? – ekad
它的if類型整數 – pavan
如果還有其他問題**請問另一個問題** –