DbSet.Find Method
Entity Framework 5.0
Uses the primary key value to attempt to find an entity tracked by the context. If the entity is not in the context then a query will be executed and evaluated against the data in the data source, and null is returned if the entity is not found in the context or in the data source. Note that the Find also returns entities that have been added to the context but have not yet been saved to the database.
Namespace: System.Data.Entity
Assembly: EntityFramework (in EntityFramework.dll)
Parameters
- keyValues
- Type: System.Object[]
The values of the primary key for the entity to be found.
Show: