Q1. Which of the following is NOT a syntax supported by LINQ?
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?
Q5. You want to add multiple new entities to DbSet
. How can you accomplish this?
Add
method and passing an instance of the class specified in the context property.AddRange
and pass an enumerable of the target entity type.Q6. If you want to create a new entity with some child entities, also known as object graph, you must call Add
on the parent and each child in order to persist the object graph, true or false?
Q7. If you set a state of an entity to modified, all columns in the corresponding table are updated when SaveChanges
is called, true or false?
Q8. You need to call Add
and then Remove
on an entity in order to trigger a delete query to be issued when SaveChanges
is called, true or false?
Q9. Which entity state does not result in a query against the database when SaveChanges
is called?
Q10. Which property of DbSet
gives you access to entities already loaded into the context from a database?
18.226.251.206