Database.ContainsKey<TEntity> Method (Object)

Checks the existance of an entity whose primary matches the id parameter.

Namespace:  DbExtensions
Assembly: DbExtensions.dll

Syntax

public bool ContainsKey<TEntity>(
	Object id
)
where TEntity : class

Parameters

id

Type: System.Object
The primary key value.

Type Parameters

TEntity

The type of the entity.

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<TEntity>().ContainsKey(id).

See Also

Reference

Database Class
DbExtensions Namespace
SqlSet.ContainsKey(Object)

© Max Toro Q.