In Entity Framework how do I map a composite key through the XML in EDMX file?
I see some posts on programmatically mapp开发者_JS百科ing a table with a composite key but I haven't found any examples to do that within xml of the edmx file. How do I do this? In the edmx of my entity type I have a key section with multiple propertyref's pointing to my composite key. However, when I go to save my changes it errors and states that there is no update function.
It seems to me, if I mark one key as the primary key and it can manage that it should be able to use a composite key as well.
Please do not reply and state that I shouldn't be using composite keys because I don't care and have no ability to change it. I didn't develop this database as it is a third-party ERP application that I'm interfacing with.
From what I can tell I may have to create a stored procedure just to save it? Isn't there a better way?
Thank You.
精彩评论