Click or drag to resize
RepositoryE, KInsertAsync Method
Inserts the entity into the database.

Namespace: LiteRepository
Assembly: LiteRepository (in LiteRepository.dll) Version: 2.0.4
Syntax
C#
public virtual Task<E> InsertAsync(
	E entity
)

Parameters

entity
Type: E
Entity to insert.

Return Value

Type: TaskE
A task representing the asynchronous operation.
Examples

For inserting the entity:

C#
var entity = new Entity { FirstName = "Alex", SecondName = "Lion" };
await repository.InsertAsync(entity);
See Also