C# Linq Net Core:排除包含搜索词的词

0 .net c# .net-core .net-core-2.0

如何在 Linq Net Core 2 中执行 String Not Contains 'paraphrase key term'?

为此,尝试在产品名称中不包含“ag”的列表中获取。

foreach (var product in Products().Where(c=>c.ProductName.NotContains("ag")))
Run Code Online (Sandbox Code Playgroud)

May*_*ayk 9

foreach (var product in Products().Where( c => !c.ProductName.Contains("ag")))
Run Code Online (Sandbox Code Playgroud)

就是这样