SqlSet.ContainsKey Method
Checks the existance of an entity whose primary matches the id parameter.
Namespace: DbExtensions
Assembly: DbExtensions.dll
Syntax
public bool ContainsKey(
Object id
)
Parameters
id
Type: System.Object
The primary key value.
Return Value
Type: Boolean
true if the primary key value exists in the database; otherwise false.
Exceptions
Exception | Condition |
---|---|
InvalidOperationException | This method can only be used on sets where the result type is an annotated class. |