Mapping Association Sets to Stored Procedures
If you are using stored procedures for inserting, updating, and deleting entities, you also need to use stored procedures to insert and delete any associations that belong to those entities (you don't need an Update function, because associations cannot be modified--they can only be created or deleted).
Mapping Foreign Key Relationships
If you are mapping a simple foreign key relationship, such as a relationship between OrderDetails and Orders in the Northwind database, use the AssociationEnd binding technique in a ModificationFunctionMapping element. The DeleteFunction and InsertFunction child elements describe parameter bindings for the ends of the association.<AssociationEnd AssociationSet="FK_Employees_Employees" From="Employees" To="Employees">
<ScalarProperty Name="EmployeeID" ParameterName="ReportsTo" />
</AssociationEnd>
Mapping Many-to-Many Associations
If you are mapping a many-to-many association that is usually supported by a link table in the database, you should use the ModificationFunctionMapping within an AssociationSetMapping. Note that the Entity Framework Designer does not support implementation of the AssociationSetMapping. You need to enter this manually in the .edmx file. For details, see the .NET Help topic Mapping Association Sets to Stored Procedures (Entity Framework).© (c) 2026 Oak Leaf Enterprises, Inc., 1996-2026 • Updated: 04/26/18
Comment or report problem with topic
