Appearance
InsertAsync Method
Definition
- Namespace:
JASE.Database - Assembly:
JASE.Database.dll
Overloads
| Name | Description |
|---|---|
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
| Name | Description |
|---|---|
T | The entity (row) type. |
Parameters
| Name | Description |
|---|---|
cancellationToken | Cancellation token. |
commandTimeout | Command timeout in seconds. Use -1 for provider default. |
item | Item to insert. |
Returns
true if the insert succeeded; otherwise false.