# Class DbObject OptimaJet.Workflow.Oracle.DbObject Namespace: [OptimaJet.Workflow.Oracle](https://api.workflowengine.io/oracle/OptimaJet.Workflow.Oracle/) ```csharp public class DbObject where TEntity : IEntity, new() ``` ## Type Hierarchy - DbObject Current type - [ProcessInstanceTree](https://api.workflowengine.io/oracle/OptimaJet.Workflow.Oracle/ProcessInstanceTree/) - [WorkflowApprovalHistory](https://api.workflowengine.io/oracle/OptimaJet.Workflow.Oracle/WorkflowApprovalHistory/) - [WorkflowForm](https://api.workflowengine.io/oracle/OptimaJet.Workflow.Oracle.Models/WorkflowForm/) - [WorkflowGlobalParameter](https://api.workflowengine.io/oracle/OptimaJet.Workflow.Oracle/WorkflowGlobalParameter/) - [WorkflowInbox](https://api.workflowengine.io/oracle/OptimaJet.Workflow.Oracle/WorkflowInbox/) - [WorkflowProcessInstance](https://api.workflowengine.io/oracle/OptimaJet.Workflow.Oracle/WorkflowProcessInstance/) - [WorkflowProcessInstancePersistence](https://api.workflowengine.io/oracle/OptimaJet.Workflow.Oracle/WorkflowProcessInstancePersistence/) - [WorkflowProcessInstanceStatus](https://api.workflowengine.io/oracle/OptimaJet.Workflow.Oracle/WorkflowProcessInstanceStatus/) - [WorkflowProcessScheme](https://api.workflowengine.io/oracle/OptimaJet.Workflow.Oracle/WorkflowProcessScheme/) - [WorkflowProcessTimer](https://api.workflowengine.io/oracle/OptimaJet.Workflow.Oracle/WorkflowProcessTimer/) - [WorkflowProcessTransitionHistory](https://api.workflowengine.io/oracle/OptimaJet.Workflow.Oracle/WorkflowProcessTransitionHistory/) - [WorkflowRuntime](https://api.workflowengine.io/oracle/OptimaJet.Workflow.Oracle.Models/WorkflowRuntime/) - [WorkflowScheme](https://api.workflowengine.io/oracle/OptimaJet.Workflow.Oracle/WorkflowScheme/) - [WorkflowSync](https://api.workflowengine.io/oracle/OptimaJet.Workflow.Oracle.Models/WorkflowSync/) ## Constructors `public DbObject(string schemaName, string dbTableName, int commandTimeout)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `schemaName` | `String` | | | `dbTableName` | `String` | | | `commandTimeout` | `Int32` | | ## Properties `public int CommandTimeout { get; }` `public string SchemaName { get; }` `public string DbTableName { get; }` `public string ObjectName { get; }` ## Methods `public Task InsertAsync(OracleConnection connection, TEntity entity, OracleTransaction transaction = null)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `OracleConnection` | | | `entity` | `{TEntity}` | | | `transaction` | `OracleTransaction` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public virtual Task UpsertAsync(OracleConnection connection, TEntity entity, OracleTransaction transaction = null)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `OracleConnection` | | | `entity` | `{TEntity}` | | | `transaction` | `OracleTransaction` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public virtual Task UpdateAsync(OracleConnection connection, TEntity entity, OracleTransaction transaction = null)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `OracleConnection` | | | `entity` | `{TEntity}` | | | `transaction` | `OracleTransaction` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task SelectAllAsync(OracleConnection connection)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `OracleConnection` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task SelectAllWithPagingAsync(OracleConnection connection, List<(string parameterName, SortDirection sortDirection)> orderParameters, Paging paging)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `OracleConnection` | | | `orderParameters` | `List` | | | `paging` | `Paging` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task GetCountAsync(OracleConnection connection)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `OracleConnection` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task GetCountByAsync(OracleConnection connection, Expression> selectorLambda, TSelect value, OracleTransaction transaction = null)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `OracleConnection` | | | `selectorLambda` | `Expression` | | | `value` | `{TSelect}` | | | `transaction` | `OracleTransaction` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task SelectByAsync(OracleConnection connection, Expression> selectorLambda, TSelect value)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `OracleConnection` | | | `selectorLambda` | `Expression` | | | `value` | `{TSelect}` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task DeleteByAsync(OracleConnection connection, Expression> selectorLambda, TSelect value, OracleTransaction transaction = null)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `OracleConnection` | | | `selectorLambda` | `Expression` | | | `value` | `{TSelect}` | | | `transaction` | `OracleTransaction` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task SelectByWithPagingAsync(OracleConnection connection, Expression> selectorLambda, TSelect value, Expression> sortLambda, SortDirection sortDirection, Paging paging)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `OracleConnection` | | | `selectorLambda` | `Expression` | | | `value` | `{TSelect}` | | | `sortLambda` | `Expression` | | | `sortDirection` | `SortDirection` | | | `paging` | `Paging` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task SelectByKeyAsync(OracleConnection connection, object id)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `OracleConnection` | | | `id` | `Object` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task DeleteAsync(OracleConnection connection, object id, OracleTransaction transaction = null)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `OracleConnection` | | | `id` | `Object` | | | `transaction` | `OracleTransaction` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task ExecuteCommandNonQueryAsync(OracleConnection connection, string commandText, params OracleParameter[] parameters)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `OracleConnection` | | | `commandText` | `String` | | | `parameters` | `OracleParameter[]` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task ExecuteCommandNonQueryAsync(OracleConnection connection, string commandText, OracleTransaction transaction = null, params OracleParameter[] parameters)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `OracleConnection` | | | `commandText` | `String` | | | `transaction` | `OracleTransaction` | | | `parameters` | `OracleParameter[]` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task ExecuteCommandScalarAsync(OracleConnection connection, string commandText, params OracleParameter[] parameters)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `OracleConnection` | | | `commandText` | `String` | | | `parameters` | `OracleParameter[]` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task ExecuteCommandScalarAsync(OracleConnection connection, string commandText, OracleTransaction transaction, params OracleParameter[] parameters)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `OracleConnection` | | | `commandText` | `String` | | | `transaction` | `OracleTransaction` | | | `parameters` | `OracleParameter[]` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task SelectAsync(OracleConnection connection, string commandText, params OracleParameter[] parameters)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `OracleConnection` | | | `commandText` | `String` | | | `parameters` | `OracleParameter[]` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task SelectAsync(OracleConnection connection, string commandText, OracleTransaction transaction, params OracleParameter[] parameters)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `OracleConnection` | | | `commandText` | `String` | | | `transaction` | `OracleTransaction` | | | `parameters` | `OracleParameter[]` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task>> SelectAsDictionaryAsync(OracleConnection connection, string commandText, params OracleParameter[] parameters)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `OracleConnection` | | | `commandText` | `String` | | | `parameters` | `OracleParameter[]` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task InsertAllAsync(OracleConnection connection, TEntity[] entities, OracleTransaction transaction = null)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `OracleConnection` | | | `entities` | `{TEntity}[]` | | | `transaction` | `OracleTransaction` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public OracleParameter CreateParameter(TEntity entity, ColumnInfo column, string namePrefix = "")` ### Parameters | Name | Type | Description | | --- | --- | --- | | `entity` | `{TEntity}` | | | `column` | `ColumnInfo` | | | `namePrefix` | `String` | | ### Returns | Type | Description | | --- | --- | | `OracleParameter` | | `protected static object ToDbValue(TValue value, OracleDbType type)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `value` | `{TValue}` | | | `type` | `OracleDbType` | | ### Returns | Type | Description | | --- | --- | | `Object` | | `protected static object FromDbValue(TValue dbValue, OracleDbType type)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `dbValue` | `{TValue}` | | | `type` | `OracleDbType` | | ### Returns | Type | Description | | --- | --- | | `Object` | | `public string GetKeyOrFirstColumn()` ### Returns | Type | Description | | --- | --- | | `String` | | ## Fields `public static List DBColumnsStatic` `public List DBColumns` [Previous ColumnInfo](https://api.workflowengine.io/oracle/OptimaJet.Workflow.Oracle/ColumnInfo/) [Next FileSchemePersistenceOracleProvider](https://api.workflowengine.io/oracle/OptimaJet.Workflow.Oracle/FileSchemePersistenceOracleProvider/)