Skip to content

Does apply changes automatically set the Entity States of an Entity Object and its children? #231

@adrianpzamora

Description

@adrianpzamora

Hello,

I am trying to implement audit fields in my system by using the DBContext ChangeTracker, getting the list of "Added" and "Modified" entities, and setting the audit fields appropriately. In my Put request function I am calling DbContext.applychanges(object). My assumption is that this will automatically set the entity states of the object and its children. However, it does not seem like it is doing that as the object's state remains "Unchanged" even when I change one of the values of the object or its children. Do I have a fundamental flaw in my understanding of this? Any help would be appreciated.

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions