none
EF 4.3 - Update related entity primary key RRS feed

  • Question

  • Hi

    I have an entity Order with sub entity OrderDetail which has OrderID and TypeID as primary key. If i want to change the TypeID later on, how should i proceed?

    Thursday, January 10, 2013 12:07 AM

Answers

  • As a rule of thumb I'd say: if each DB table has a single, surrogate primary key column, all is well - whereas as soon as you are putting any other meaning into a PK than just being a unique row-identifier, you'd run into troubles.

    See also Updating the Entity primary key


    • Edited by Stefan Wuebbe Thursday, January 10, 2013 8:41 AM Forum hyperlink feature
    • Proposed as answer by Patrice ScribeMVP Thursday, January 10, 2013 6:16 PM
    • Marked as answer by Syslock Friday, January 11, 2013 5:49 PM
    Thursday, January 10, 2013 8:37 AM