Database.Find Method (Type, Object)

Gets the entity whose primary key matches the id parameter.

Namespace:  DbExtensions
Assembly: DbExtensions.dll

Syntax

public Object Find(
	Type entityType,
	Object id
)

Parameters

entityType

Type: System.Type
The type of the entity.

id

Type: System.Object
The primary key value.

Return Value

Type: 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.