Method Insert
Insert<T, TList>(IListEntityService<T, TList>, TList, CancellationToken)
Inserts a single entity of type TList into the IListEntityService.
public static Task<List<PrimaryKeys<T>>> Insert<T, TList>(this IListEntityService<T, TList> entityService, TList entity, CancellationToken cancellationToken = default) where T : class where TList : class
Parameters
entityService
IListEntityService<T, TList>The IListEntityService instance.
entity
TListThe entity to insert.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task<List<PrimaryKeys<T>>>
A task representing the asynchronous operation.
Type Parameters
T
The type of the entity.
TList
The type of the entity in the list.
Insert<T, TInsert>(IInsertEntityService<T, TInsert>, TInsert, CancellationToken)
Inserts a single entity of type TInsert into the IInsertEntityService.
public static Task<List<PrimaryKeys<T>>> Insert<T, TInsert>(this IInsertEntityService<T, TInsert> entityService, TInsert entity, CancellationToken cancellationToken = default) where T : class where TInsert : class
Parameters
entityService
IInsertEntityService<T, TInsert>The IInsertEntityService instance.
entity
TInsertThe entity to insert.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task<List<PrimaryKeys<T>>>
A task representing the asynchronous operation.
Type Parameters
T
The type of the entity.
TInsert
The type of the entity to insert.
Insert<T>(IEntityService<T>, T, CancellationToken)
Inserts a single entity of type T into the IEntityService.
public static Task<PrimaryKeys<T>> Insert<T>(this IEntityService<T> entityService, T entity, CancellationToken cancellationToken = default) where T : class
Parameters
entityService
IEntityService<T>The IEntityService instance.
entity
TThe entity to insert.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task<PrimaryKeys<T>>
A task representing the asynchronous operation.
Type Parameters
T
The type of the entity.