C# Entity Framework Basics CRUD Operations Updating Entities

olu adesina
PRO
olu adesina
Pro Student 19,018 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
176,189 Points

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