Skip to content

Support modifying the value of primary or alternate key properties #4073

@tuespetre

Description

@tuespetre

In the following location, an exception is raised when attempting to make modifications to a property that belongs to either a primary or alternate key (using the IsKey extension method):

https://github.com/aspnet/EntityFramework/blob/7.0.0-rc1/src/EntityFramework.Core/ChangeTracking/Internal/InternalEntityEntry.cs#L231

I have to ask: why restrict modifications on alternate keys, and why not use IsPrimaryKey here instead?

Metadata

Metadata

Assignees

No one assigned
    No fields configured for Feature.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions