Skip to content

InsertAsync Method ​

Definition ​

  • Namespace: JASE.Database
  • Assembly: JASE.Database.dll

Overloads ​

NameDescription
Task<bool> InsertAsync(T item, int commandTimeout = null, CancellationToken cancellationToken = null)Inserts a single record into the corresponding table.
Task<bool> InsertAsync(Type entityType, object item, int commandTimeout = null, CancellationToken cancellationToken = null)Inserts a single record using a runtime entity type.

Task<bool> InsertAsync(Type entityType, object item, int commandTimeout = null, CancellationToken cancellationToken = null) ​

csharp
Task<bool> InsertAsync(Type entityType, object item, int commandTimeout = null, CancellationToken cancellationToken = null)

Inserts a single record using a runtime entity type.

Task<bool> InsertAsync(T item, int commandTimeout = null, CancellationToken cancellationToken = null) ​

csharp
Task<bool> InsertAsync(T item, int commandTimeout = null, CancellationToken cancellationToken = null)

Inserts a single record into the corresponding table.

Type parameters ​

NameDescription
TThe entity (row) type.

Parameters ​

NameDescription
cancellationTokenCancellation token.
commandTimeoutCommand timeout in seconds. Use -1 for provider default.
itemItem to insert.

Returns ​

true if the insert succeeded; otherwise false.