SqlSet<TResult>.Contains(TResult) Method

Checks the existance of the entity, using the primary key value.

Namespace: DbExtensions
Assembly: DbExtensions.dll

Overloads

Name Description
Contains(Object) Checks the existance of the entity, using the primary key value.
Contains(TResult) Checks the existance of the entity, using the primary key value.

Syntax

public bool Contains(
	TResult entity
)

Parameters

entity  TResult

The entity whose existance is to be checked.

Return Value

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.

See Also

Reference

SqlSet<TResult> Class
DbExtensions Namespace

© Max Toro Q.