Fix: The property 'X' is part of a key and so cannot be modified or marked as modified in EF Core
EF Core never updates a key value on a tracked entity. Stop copying the key from DTOs, use a unique index instead of an alternate key, and change a real key by inserting a new row and deleting the old one. Tested on EF Core 10.0.14.