| RepositoryE, KGetAsync Method |
Gets a entity with key from the database.
Namespace: LiteRepositoryAssembly: LiteRepository (in LiteRepository.dll) Version: 2.0.4
Syntaxpublic virtual Task<E> GetAsync(
K key
)
Parameters
- key
- Type: K
Key of the entity.
Return Value
Type:
TaskEA task representing the asynchronous operation.
ExamplesFor getting the entity by it's key:
var key = new EntityKey { Id = 12 };
var entity = await repository.GetAsync(entity);
See Also