Q1. Since we are not creating a new entity, but a complex type, we need to use ComplexTypeConfiguration
of the T
base class to configure it.
Q2. The answer is false. We can use the ToTable
method in order to configure an entity to be stored in a table with a name that is different from the class name for this entity.
Q3. The answer is false. We can use the Ignore
method to exclude some properties from the persistence engine.
Q4. The process of selecting a subset of columns from a table, that is, a subset of properties from an entity, is called projection.
Q5. We do not have to declare a type for a result set; we can always use anonymous types.
Q6. We do not have to use joins to get related data in a query, since relationships exist in properties inside entities. Thus, related data is available inside a query by walking through these association properties.
Q7. In order to repeat parent entity data along with child data in the result set, we need to use SelectMany
method of LINQ.
Q8. The set operator Distinct
can be used to create a set of unique values from a query.
Q9. We cannot accomplish LEFT OUTER JOIN in LINQ with a single method.
Q10. The Skip
and Take
methods are used to accomplish paging. The Skip
method, as the name implies, excludes some number of records from the result set, even though they match the filter. The Take
method only takes a specified number of rows to include in the result set, even though more rows match the filter.
Q11. We can definitely create grouping queries based on multiple properties. We can typically use the anonymous type to specify which properties the grouped data is based on.