Click or drag to resize
DbGetByKeyE, K Method
Returns an entity with the key.

Namespace: LiteRepository
Assembly: LiteRepository (in LiteRepository.dll) Version: 2.0.4
Syntax
C#
public virtual E GetByKey<E, K>(
	K key,
	Type type = null
)
where E : class, K
where K : class

Parameters

key
Type: K
Entity key.
type (Optional)
Type: SystemType
Type which sets a subsets of the fields to retrive.

Type Parameters

E
Type of the entity.
K
Type of the entity key.

Return Value

Type: E
Entity form database or null if entity was not found.
See Also