Entity Framework Core 2.1 introduced query types, which are similar to usual entity types, but differ from them in certain aspects. The main differences are the following:
• | Query types do not require a primary key. |
• | Query type changes are not tracked by the context, and are not applied to the database. |
• | Query types can have navigation properties to entity types, but classes cannot have navigation properties. |
For more information about query types and their differences, see Entity Framework Core documentation.
For Entity Framework Core 3, Entity Developer generates keyless entity types instead of query types.
Entity Developer fully supports query types. To generate a class as a query type for Entity Framework Core 2/keyless entity type for Entity Framework Core 3, set its Query Type property to True: Query types support both mapping to tables or views and to Raw SQL Queries. |