Q1. Which of the following is NOT a syntax supported by LINQ?
Method.
SQL.
Query.
Q2. If you retrieve an entity via LINQ from a database, make changes to it and call SaveChanges
, all properties are updated in the database, not only the changed ones, true or false?
Q3. In order to sort the data by multiple properties, you simply need to call OrderBy
multiple times in LINQ that is using the method syntax, true or false?
Q4. How to add two filter conditions to a LINQ query with the query syntax?
Use multiple Where calls.
Use logical AND operator.
Issue two queries.
Q5. You want to add multiple new entities to DbSet
. How can you accomplish this?
By calling the
Add
method and passing an instance of the class specified in the context property.By calling
AddRange
and pass an enumerable of the target entity type.By setting the state to Added using the context API on each new entity.
All of the above.
Q6. If you want to create a new entity with some child entities, also known as object graph...