当前位置:网站首页>LINQ extension methods - any() vs. where() vs. exists() - LINQ extension methods - any() vs. where() vs. exists()

LINQ extension methods - any() vs. where() vs. exists() - LINQ extension methods - any() vs. where() vs. exists()

2022-06-21 14:24:00 Bustling city

problem :

Unfortunately the names of these methods make terrible search terms, and I've been unable to find a good resource that explains the difference between these methods--as in when to use each. Unfortunately , The names of these methods produce terrible search terms , And I have been unable to find good resources to explain the differences between these methods - Just like when to use each method .

Thanks. thank you .

Edit: edit :

The sort of query that I'm trying to fully understand is something like this: The kind of query I'm trying to fully understand is this :

context.Authors.Where(a => a.Books.Any(b => b.BookID == bookID)).ToList();

And thanks to all who've answered. Thanks to all who answered .


Solution :

Reference resources : https://stackoom.com/en/question/FXNw
原网站

版权声明
本文为[Bustling city ]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202221425386430.html