O'Reilly logo

Code-First Development with Entity Framework by Sergey Barskiy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

In this chapter, you learned how to issue basic queries to retrieve entities from a database. LINQ was the driving force behind getting the data from the database through Entity Framework. There are two basic approaches to using LINQ: the method and query syntaxes. The query syntax is quite similar to SQL, whereas the method syntax may be more suitable for developers with more experience in C# or VB.NET than SQL. We saw how to use both approaches to filter data. We saw that the where clause can be used to combine multiple conditions using logical operators. The ordering of data can be done as well, using either the OrderBy and OrderByDescending methods or ascending or descending keywords. In order to support multiple orders by conditions, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required