Basic LINQ

Image

You may have already used a version of LINQ. If you have, there won’t be much that’s new to you in this chapter; for the most part, LINQ is LINQ. But if it’s new to you, here is the basic syntax:

Image

Image Put On Your Thinking Hat

Here’s a simple entity that represents a supplier. Can you write a LINQ query that returns the entire entity where the company is in Kansas (“KS”) or Missouri (“MO”), ordered by the AddressCity?

(HINT: To specify to ...

Get Fluent Entity Framework now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.