klyn.data.memory.MemoryRepository.MemoryRepository
constructor
public MemoryRepository(values as IList<T>):
Description

Creates a validated read-only repository.

Parameters
ParameterDescription
valuesExisting entity rows wrapped by the repository.
Throws
  • EntityMappingException if T has no unique mapped @Id property.
  • DuplicateIdentityException on the first duplicate identity.
Example
repository = MemoryRepository<User, Int>(users)