Class TenantGlobalParameterApi
OptimaJet.Workflow.Core.Persistence.TenantGlobalParameterApi
Provides global parameter operations through an IPersistenceProvider for a tenant-specific or shared scope.
Namespace: OptimaJet.Workflow.Core.Persistence
public sealed class TenantGlobalParameterApiConstructors
public TenantGlobalParameterApi(IPersistenceProvider persistenceProvider, string? tenantId) #Initializes a TenantGlobalParameterApi that uses the specified IPersistenceProvider and tenant scope.
Properties
public string? TenantId { get; } #Gets the tenant identifier that defines the global parameter scope.
Methods
public Task SaveAsync<T>(string type, string name, T value) #Saves a global parameter value in the tenant-specific or shared scope represented by this instance.
public Task<T> LoadAsync<T>(string type, string name) #Loads a global parameter value from the tenant-specific or shared scope represented by this instance.
public Task<Dictionary<string, T>> LoadWithNamesAsync<T>(string type, Sorting? sort = null) #Loads the names and values of global parameters that have a logical type in the tenant-specific or shared scope represented by this instance.
public Task<List<T>> LoadValuesAsync<T>(string type, Sorting? sort = null) #Loads the values of global parameters that have a logical type in the tenant-specific or shared scope represented by this instance.
public Task<PagedResponse<T>> LoadWithPagingAsync<T>(string type, Paging paging, Sorting? sort = null) #Loads a page of global parameter values that have a logical type from the tenant-specific or shared scope represented by this instance, together with the total matching count.
Parameters
Name
Type
Description
typeStringThe logical parameter type.
Returns
Type
Description
Task<PagedResponse<T>>A PagedResponse<T> containing the selected parameter values and total matching count.
Exceptions
Type
Description
ArgumentNullExceptiontype is null.public Task DeleteAsync(string type, string? name = null) #Deletes global parameters of a logical type from the tenant-specific or shared scope represented by this instance, optionally limiting the deletion by parameter name.