C# Entity Framework Basics CRUD Operations Updating Entities

olu adesina
olu adesina
19,520 Points

Attach() in ENTITY FRAMEWORK

In the third example of this video which uses the attach method how does EF know which comic book its updating without using the find method first?

1 Answer

Steven Parker
Steven Parker
195,447 Points

The value in the Id field (comicBook.Id) uniquely identifies which database record (which comic book) it is.