Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
要素の配列を linq クエリと比較するにはどうすればよいですか。要素の配列をコントローラーに渡し、渡された要素のみを含むレコードを比較して表示したいと思います。
次のような値の配列を渡し、["first","second","third"]これらのレコードをlinqクエリと比較して、これら3つのレコードを含む結果を生成したい
["first","second","third"]
よくわかりませんが、おそらくこのようなものが必要です
String[] values = {"first", "second", "third"}; List<YourObject> query = (from p in this.db.table where values.Contains(p.values) select p).ToList();