DataManager Class
Definition
The DataManager is an abstract class in the Cuemon.Data namespace that can be used to implement execute commands of different database providers.
public abstract class DataManager : Configurable<DataManagerOptions>, IConfigurable<DataManagerOptions>
- Inheritance
-
DataManager
- Implements
- Derived
- Inherited Members
Constructors
| Name | Description |
|---|---|
| DataManager(Action<DataManagerOptions>) | Initializes a new instance of the DataManager class. |
Methods
| Name | Description |
|---|---|
| Clone() | Creates a new object that is a copy of the current instance. |
| Execute(DataStatement) | Executes the command statement and returns the number of rows affected. |
| ExecuteAsync(DataStatement, CancellationToken) | Asynchronously executes the command statement and returns the number of rows affected. |
| ExecuteCommandAsync<T>(DataStatement, Func<DbCommand, Task<T>>) | Asynchronous core method for executing methods on the DbCommand resolved from the abstract GetDbCommand(DataStatement) method. |
| ExecuteCommand<T>(DataStatement, Func<IDbCommand, T>) | Core method for executing methods on the IDbCommand interface resolved from the abstract GetDbCommand(DataStatement) method. |
| ExecuteExists(DataStatement) | Executes the command statement and returns |
| ExecuteExistsAsync(DataStatement, CancellationToken) | Asynchronously executes the command statement and returns |
| ExecuteReader(DataStatement) | Executes the command statement and returns an object supporting the IDataReader interface. |
| ExecuteReaderAsync(DataStatement, CancellationToken) | Asynchronously executes the command statement and returns a DbDataReader. |
| ExecuteScalar(DataStatement) | Executes the command statement, and returns the value from the first column of the first row in the result set. Additional columns or rows are ignored. |
| ExecuteScalarAsAsync<TResult>(DataStatement, Action<ObjectFormattingOptions>, CancellationToken) | Asynchronously executes the command statement, and attempts to convert the first column of the first row in the result set to the specified |
| ExecuteScalarAsType(DataStatement, Type, Action<ObjectFormattingOptions>) | Executes the command statement, and attempts to convert the first column of the first row in the result set to the specified |
| ExecuteScalarAsTypeAsync(DataStatement, Type, Action<ObjectFormattingOptions>, CancellationToken) | Asynchronously executes the command statement, and attempts to convert the first column of the first row in the result set to the specified |
| ExecuteScalarAs<TResult>(DataStatement, Action<ObjectFormattingOptions>) | Executes the command statement, and attempts to convert the first column of the first row in the result set to the specified |
| ExecuteScalarAsync(DataStatement, CancellationToken) | Asynchronously executes the command statement, and returns the value from the first column of the first row in the result set. Additional columns or rows are ignored. |
| ExecuteString(DataStatement) | Executes the command statement and returns a string. |
| ExecuteStringAsync(DataStatement, CancellationToken) | Asynchronously executes the command statement and returns a string. |
| GetDbCommand(DataStatement) | Gets the command object to be used by all execute related methods. |