Database.Contains Method

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

Namespace:  DbExtensions
Assembly: DbExtensions.dll

Syntax

public bool Contains(
	Object entity
)

Parameters

entity

Type: System.Object
The entity whose existance is to be checked.

Return Value

Type: Boolean
true if the primary key value exists in the database; otherwise false.

Remarks

This method is a shortcut for db.Table(entity.GetType()).Contains(entity).

See Also

Reference

Database Class
DbExtensions Namespace
SqlSet.Contains(Object)

© Max Toro Q.