Condividi tramite


QueryView Element (AssociationSetMapping)

In the Entity Data Model (EDM), the QueryView element in an AssociationSetMapping defines a read-only mapping between an association in the conceptual model and an entity in the storage model that represents a link table in the relational schema. You define this query view mapping with an Entity SQL query that is evaluated against the storage model, and you express the result set in terms of an entity in the conceptual model. Because query views are read-only, you cannot use standard update commands to update types that are defined by query views. You must make updates to these types by using modification functions. For more information, see How to: Map Modification Functions to Stored Procedures.

The following considerations apply when defining query views for associations:

  • When you define a query view, you cannot specify the StorageSetName attribute on the AssociactionSetMapping element.

  • When you define a query view, the AssociationSetMapping element cannot also contain EndProperty mappings.

For more information about query views, see QueryView Element (EntitySetMapping).

See Also

Concepts

Entity Data Model Mapping Scenarios (Application Scenarios)
AssociationSetMapping Element (MSL)