-1
var query = from c in countryStates
where (c.CountryStateID.ToString().Contains(_RestrictCountryStateID))
orderby c.CountryStateDesc
select c;
在此代碼_RestrictCountryStateID是一個字符串,其中包含CountrySateIDs ,我不知道每個查詢我有_RestrictCountryStateID中有多少CountrySateIDs。如何在C#中使用linq查詢中的experssion動態?
如何寫出這個場景的地方?
此查詢沒有工作。 –