-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动态?
如何写出这个场景的地方?
此查询没有工作。 –