# Class WorkflowProcessInstancePersistence OptimaJet.Workflow.DbPersistence.WorkflowProcessInstancePersistence Namespace: [OptimaJet.Workflow.DbPersistence](https://api.workflowengine.io/sql-server/OptimaJet.Workflow.DbPersistence/) ```csharp public class WorkflowProcessInstancePersistence : DbObject ``` ## Type Hierarchy - [DbObject](https://api.workflowengine.io/sql-server/OptimaJet.Workflow.DbPersistence/DbObject-TEntity/) - WorkflowProcessInstancePersistence Current type ## Constructors `public WorkflowProcessInstancePersistence(string schemaName, int commandTimeout)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `schemaName` | `String` | | | `commandTimeout` | `Int32` | | ## Methods `public Task SelectByProcessIdAsync(SqlConnection connection, Guid processId)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `SqlConnection` | | | `processId` | `Guid` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task SelectByNameAsync(SqlConnection connection, Guid processId, string parameterName)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `SqlConnection` | | | `processId` | `Guid` | | | `parameterName` | `String` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task DeleteByProcessIdAsync(SqlConnection connection, Guid processId, SqlTransaction transaction = null)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `SqlConnection` | | | `processId` | `Guid` | | | `transaction` | `SqlTransaction` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task DeleteByNameAsync(SqlConnection connection, Guid processId, string parameterName, SqlTransaction transaction = null)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `SqlConnection` | | | `processId` | `Guid` | | | `parameterName` | `String` | | | `transaction` | `SqlTransaction` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task UpsertAsync(SqlConnection connection, ProcessInstancePersistenceEntity entity, bool preferUpdateFirst, SqlTransaction transaction)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `SqlConnection` | | | `entity` | `ProcessInstancePersistenceEntity` | | | `preferUpdateFirst` | `Boolean` | | | `transaction` | `SqlTransaction` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public static DataTable ToDataTable()` ### Returns | Type | Description | | --- | --- | | `DataTable` | | [Previous WorkflowProcessInstance](https://api.workflowengine.io/sql-server/OptimaJet.Workflow.DbPersistence/WorkflowProcessInstance/) [Next WorkflowProcessInstanceStatus](https://api.workflowengine.io/sql-server/OptimaJet.Workflow.DbPersistence/WorkflowProcessInstanceStatus/)