Table of Contents

Method Insert

Namespace
Innova.Data.Entity
Assembly
Innova.Data.dll

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 TList

The entity to insert.

cancellationToken CancellationToken

The 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 TInsert

The entity to insert.

cancellationToken CancellationToken

The 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 T

The entity to insert.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<PrimaryKeys<T>>

A task representing the asynchronous operation.

Type Parameters

T

The type of the entity.