Tech Off Post

Single Post Permalink

View Thread: Question about EF
  • User profile image

    , spivonious wrote

    @JohnAskew: Like I said, it's an existing database with other applications reading it, so updating the key structure isn't a real option.

    I was just surprised at this limitation of EF, since every database I've ever used lets you update the PK column. I wonder what the reasoning is behind this decision. Does EF not track original values like ADO.NET DataColumns do?

    I would imagine PK values are immutable for EF tracking and navigation (as FK relations).

    I'd not want to deal with concurrency issues, meddling with PK values... perhaps that's one reason...

    ADO.NET DataColumns - how does it handle data access concurrency with transient PK values?

    Or is this PK value changing occurring offline?

    What an odd strategy, changing PK values... I'm curious why is this being done?