# Class WorkflowScheme OptimaJet.Workflow.DbPersistence.WorkflowScheme Namespace: [OptimaJet.Workflow.DbPersistence](https://api.workflowengine.io/sql-server/OptimaJet.Workflow.DbPersistence/) ```csharp public class WorkflowScheme : DbObject ``` ## Type Hierarchy - [DbObject](https://api.workflowengine.io/sql-server/OptimaJet.Workflow.DbPersistence/DbObject-TEntity/) - WorkflowScheme Current type ## Constructors `public WorkflowScheme(string schemaName, int commandTimeout)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `schemaName` | `String` | | | `commandTimeout` | `Int32` | | ## Methods `public Task SelectByCodeAsync(SqlConnection connection, string code, string tenantId)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `SqlConnection` | | | `code` | `String` | | | `tenantId` | `String` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task SelectByCodeExactAsync(SqlConnection connection, string code, string tenantId)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `SqlConnection` | | | `code` | `String` | | | `tenantId` | `String` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public override Task UpsertAsync(SqlConnection connection, SchemeEntity entity, SqlTransaction transaction = null)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `SqlConnection` | | | `entity` | `SchemeEntity` | | | `transaction` | `SqlTransaction` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task> GetInlinedSchemeCodesAsync(SqlConnection connection, string tenantId = null)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `SqlConnection` | | | `tenantId` | `String` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task> GetRelatedSchemeCodesAsync(SqlConnection connection, string schemeCode, string tenantId = null)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `SqlConnection` | | | `schemeCode` | `String` | | | `tenantId` | `String` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task SelectAllWorkflowSchemesWithPagingAsync(SqlConnection connection, List<(string parameterName, SortDirection sortDirection)> orderParameters, Paging paging)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `SqlConnection` | | | `orderParameters` | `List` | | | `paging` | `Paging` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task> GetSchemeCodesByTagsAsync(SqlConnection connection, string tenantId, IEnumerable tags)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `SqlConnection` | | | `tenantId` | `String` | | | `tags` | `IEnumerable` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task AddSchemeTagsAsync(SqlConnection connection, string schemeCode, string tenantId, IEnumerable tags, IWorkflowBuilder builder)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `SqlConnection` | | | `schemeCode` | `String` | | | `tenantId` | `String` | | | `tags` | `IEnumerable` | | | `builder` | `IWorkflowBuilder` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task RemoveSchemeTagsAsync(SqlConnection connection, string schemeCode, string tenantId, IEnumerable tags, IWorkflowBuilder builder)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `SqlConnection` | | | `schemeCode` | `String` | | | `tenantId` | `String` | | | `tags` | `IEnumerable` | | | `builder` | `IWorkflowBuilder` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task SetSchemeTagsAsync(SqlConnection connection, string schemeCode, string tenantId, IEnumerable tags, IWorkflowBuilder builder)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `SqlConnection` | | | `schemeCode` | `String` | | | `tenantId` | `String` | | | `tags` | `IEnumerable` | | | `builder` | `IWorkflowBuilder` | | ### Returns | Type | Description | | --- | --- | | `Task` | | [Previous WorkflowProcessTransitionHistory](https://api.workflowengine.io/sql-server/OptimaJet.Workflow.DbPersistence/WorkflowProcessTransitionHistory/) [Next Migration10Initial](https://api.workflowengine.io/sql-server/OptimaJet.Workflow.MSSQL.Migrations/Migration10Initial/)