상태변경
-
EF CORE의 상태 변경프로그래밍 2024. 10. 16. 11:24
EF CORE에서 중요한 것 중 하나는 Tracking, 즉, 상태 추적이다. EF CORE의 Entity는 상태 추적을 비활성화하지 않는 이상에는 모두 상태를 추적하게 되어 있다. 따라서, Entity는 조회, 삽입, 수정, 삭제에 대한 추적 마킹을 가지고 다닌다고 생각하면 되겠다. 해당 마킹 타입은 아래와 같다. public enum EntityState{ /// The entity is not being tracked by the context. Detached, /// /// The entity is being tracked by the context and exists in the database. Its property /// values have not changed..