I have a navigation property of an entity mapped to another table (a "link table" to enabled a many to many relationship).
This selects the data into the navigation property.
To update it I have written an SP to update this link table, which now exists inFunction Imports
in the model, which I can call, as it is exposed on the context.
However, updating the entity and saving causes an exception: Unable to update the EntitySet 'setName' because it has a开发者_开发技巧 DefiningQuery and no element exists in the element to support the current operation., since I have not mapped a function for Insert as I am calling my imported function on the context.
Is there a way to update the entity's Association to only select from the link table and leave the update/insert to handled by other code?
This has been solved by mapping the link table to an entity in the EDM, associating it appropriately (with Navigation properties), including the SP in the EDM, mapping the SP to the Insert function and unit testing.
Seems to be happy.
精彩评论