Database.Find<TEntity> Method (Object)

Gets the entity whose primary key matches the id parameter.

Namespace:  DbExtensions
Assembly: DbExtensions.dll

Syntax

public TEntity Find<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: TEntity
The entity whose primary key matches the id parameter, or null if the id does not exist.

Remarks

This method is a shortcut for db.Table<TEntity>().Find(id).

See Also

Reference

Database Class
DbExtensions Namespace
SqlSet<TResult>.Find(Object)

© Max Toro Q.