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

Chapter 4: Querying, Inserting, Updating, and Deleting Data

Q1. LINQ supports two types of query syntaxes—method, which looks like any other method calls in your programming language, and Query, which resembles SQL in its appearance.

Q2. The answer is false. If an entity is tracked by the context after retrieval, all changes are tracked individually. Hence, Entity Framework will create an update query that only includes columns/properties touched by the code after the entity in question was retrieved.

Q3. Only the first property in the sort order is specified by the OrderBy method; all subsequent ones should be specified by the ThenBy method calls.

Q4. In order to specify multiple conditions, you need to use logical operators in a single Where method. ...

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