Database.Find(Type, Object) Method

Gets the entity whose primary key matches the id parameter.

Namespace: DbExtensions
Assembly: DbExtensions.dll

Overloads

  Name Description
Public method Find(Type, Object) Gets the entity whose primary key matches the id parameter.
Public method Find<TEntity>(Object) Gets the entity whose primary key matches the id parameter.

Syntax

public Object Find(
	Type entityType,
	Object id
)

Parameters

entityType  Type

The type of the entity.

id  Object

The primary key value.

Return Value

Object
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(entityType).Find(id).

See Also

Reference

Database Class
DbExtensions Namespace
SqlSet.Find(Object)

© Max Toro Q.