Class DecisionModelDTO
Data Transfer Object proxy for a DecisionModel.
Inherited Members
Namespace: Quantellia.WMServer.DecisionModeler
Assembly: WMServer.dll
Syntax
public class DecisionModelDTO : WMAssetBaseDTO<DecisionModel>, IWMAssetBaseDTO, IWMVersionableAsset, IWMOwnableResource, IWMResource, IDbEntity, IWMEntity
Remarks
The properties of the DecisionModel are populated, but the list of elements is deferred.
Constructors
DecisionModelDTO()
Declaration
public DecisionModelDTO()
DecisionModelDTO(string)
Declaration
public DecisionModelDTO(string id)
Parameters
Type | Name | Description |
---|---|---|
string | id |
Properties
ImageUrl
URL of image to display when decision model listed.
Declaration
public string? ImageUrl { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
Clone(WMPrincipal, WMAssetIdentifier, VersionCreateArgs?, WMAppDbContext)
Clones the specified DecisionModel with an iterated name "AssetName (1), etc... ", iterates the version number.
Declaration
public static Task<DecisionModelDTO> Clone(WMPrincipal principal, WMAssetIdentifier identifier, VersionCreateArgs? args, WMAppDbContext context)
Parameters
Type | Name | Description |
---|---|---|
WMPrincipal | principal | The owner of the directory |
WMAssetIdentifier | identifier | The identifier of the directory |
VersionCreateArgs | args | Arguments for creating a version. |
WMAppDbContext | context | The DbContext |
Returns
Type | Description |
---|---|
Task<DecisionModelDTO> |
Exceptions
Type | Condition |
---|---|
Exception |
Commit(WMPrincipal, WMAssetIdentifier, WMAppDbContext)
Commits the specified DecisionModel as Head.
Declaration
public static Task Commit(WMPrincipal principal, WMAssetIdentifier identifier, WMAppDbContext context)
Parameters
Type | Name | Description |
---|---|---|
WMPrincipal | principal | The owner of the directory |
WMAssetIdentifier | identifier | The identifier of the directory |
WMAppDbContext | context | The DbContext |
Returns
Type | Description |
---|---|
Task |
Exceptions
Type | Condition |
---|---|
Exception |
Create(WMPrincipal, WMAppDbContext, DecisionModelDTO, ICollection<object>)
Declaration
public static Task<DecisionModelDTO> Create(WMPrincipal principal, WMAppDbContext context, DecisionModelDTO a_dto, ICollection<object> elements)
Parameters
Type | Name | Description |
---|---|---|
WMPrincipal | principal | |
WMAppDbContext | context | |
DecisionModelDTO | a_dto | |
ICollection<object> | elements | The elements of the supplied DecisionModelDTO |
Returns
Type | Description |
---|---|
Task<DecisionModelDTO> |
Delete(WMPrincipal, WMAssetIdentifier, WMAppDbContext)
Delete the DecisionModel with the corresponding ID or FullPathName
Declaration
public static Task Delete(WMPrincipal principal, WMAssetIdentifier identifier, WMAppDbContext context)
Parameters
Type | Name | Description |
---|---|---|
WMPrincipal | principal | The owner of the directory |
WMAssetIdentifier | identifier | The identifier of the corresponding DecisionModel to be deleted. |
WMAppDbContext | context | The DbContext |
Returns
Type | Description |
---|---|
Task |
Exceptions
Type | Condition |
---|---|
Exception |
FromModel()
Create this instance by reading properties from a DecisionModel
Declaration
public override void FromModel()
Overrides
Get(WMPrincipal, WMAssetIdentifier, WMAppDbContext)
Declaration
public static Task<DecisionModelDTO> Get(WMPrincipal principal, WMAssetIdentifier identifier, WMAppDbContext context)
Parameters
Type | Name | Description |
---|---|---|
WMPrincipal | principal | |
WMAssetIdentifier | identifier | The identifier of the asset |
WMAppDbContext | context |
Returns
Type | Description |
---|---|
Task<DecisionModelDTO> |
Exceptions
Type | Condition |
---|---|
Exception |
GetAll(WMPrincipal, WMAppDbContext)
Declaration
public static Task<IEnumerable<DecisionModelDTO>> GetAll(WMPrincipal principal, WMAppDbContext context)
Parameters
Type | Name | Description |
---|---|---|
WMPrincipal | principal | |
WMAppDbContext | context |
Returns
Type | Description |
---|---|
Task<IEnumerable<DecisionModelDTO>> |
ResourceDefinition()
The resource operation definition for this asset.
Declaration
public static WMResourceOperationsDefinition ResourceDefinition()
Returns
Type | Description |
---|---|
WMResourceOperationsDefinition |
UpdateModel(WMPrincipal, DbContext, object[]?)
Declaration
public override Task<DecisionModel> UpdateModel(WMPrincipal principal, DbContext context, object[]? data = null)
Parameters
Type | Name | Description |
---|---|---|
WMPrincipal | principal | |
DbContext | context | |
object[] | data |
Returns
Type | Description |
---|---|
Task<DecisionModel> |
Overrides
UpdateWithElements(WMPrincipal, WMAppDbContext, WMAssetIdentifier, DecisionModelDTO, ICollection<object>)
Declaration
public static Task<DecisionModelDTO> UpdateWithElements(WMPrincipal principal, WMAppDbContext context, WMAssetIdentifier identifier, DecisionModelDTO a_dto, ICollection<object> elements)
Parameters
Type | Name | Description |
---|---|---|
WMPrincipal | principal | |
WMAppDbContext | context | |
WMAssetIdentifier | identifier | The identifier of the asset |
DecisionModelDTO | a_dto | |
ICollection<object> | elements | The elements of the supplied DecisionModelDTO |
Returns
Type | Description |
---|---|
Task<DecisionModelDTO> |
Versions(WMPrincipal, WMAssetIdentifier, WMAppDbContext)
Gets all versions of the specified DecisionModel.
Declaration
public static Task<IEnumerable<VersionArgs>> Versions(WMPrincipal principal, WMAssetIdentifier identifier, WMAppDbContext context)
Parameters
Type | Name | Description |
---|---|---|
WMPrincipal | principal | The owner of the directory |
WMAssetIdentifier | identifier | The identifier of the directory |
WMAppDbContext | context | The DbContext |
Returns
Type | Description |
---|---|
Task<IEnumerable<VersionArgs>> |
Exceptions
Type | Condition |
---|---|
Exception |