Class SimulationDTO
Class acting as a DataTransferObject<T> proxy for reading/writing Simulation objects to and from the application database
Inherited Members
Namespace: Quantellia.WMServer.Simulation
Assembly: WMServer.dll
Syntax
public class SimulationDTO : DataTransferObject<Simulation>, IDbEntity, IWMEntity, IDocumentedEntity, IWMOwnableResource, IWMResource
  Properties
CreatedBy
id of the user that created this entity.
Declaration
public string CreatedBy { get; set; }
  Property Value
| Type | Description | 
|---|---|
| string | 
CreatedDate
Date and time at which this entity was last updated.
Declaration
public DateTime CreatedDate { get; set; }
  Property Value
| Type | Description | 
|---|---|
| DateTime | 
DecisionModelID
The id of the decision model used in this simulation
Declaration
public string DecisionModelID { get; set; }
  Property Value
| Type | Description | 
|---|---|
| string | 
Documentation
Longer form documenation possibly in HTML, markdown, or other formats. May be null.
Declaration
public string? Documentation { get; set; }
  Property Value
| Type | Description | 
|---|---|
| string | 
DocumentationMIMEType
MIME type used to encode the Documentation property.
May be null if Documentation is null, otherwise it must be
set to a valid MIME type.
Declaration
public string? DocumentationMIMEType { get; set; }
  Property Value
| Type | Description | 
|---|---|
| string | 
LastUpdatedBy
id of the user that last updated this entity.
Declaration
public string LastUpdatedBy { get; set; }
  Property Value
| Type | Description | 
|---|---|
| string | 
LastUpdatedDate
Date and time at which this entity was last updated.
Declaration
public DateTime LastUpdatedDate { get; set; }
  Property Value
| Type | Description | 
|---|---|
| DateTime | 
Name
Name given to the Evaluation. Must not be null.
Declaration
public string Name { get; set; }
  Property Value
| Type | Description | 
|---|---|
| string | 
OwnerID
Reference to the WMPrincipal that owns this Evaluation
Declaration
public string OwnerID { get; set; }
  Property Value
| Type | Description | 
|---|---|
| string | 
OwnerType
Declaration
public string OwnerType { get; set; }
  Property Value
| Type | Description | 
|---|---|
| string | 
ReturnElements
The elements expected to be returned in this simulation in serialized format
Declaration
public string ReturnElements { get; set; }
  Property Value
| Type | Description | 
|---|---|
| string | 
SimulationParams
The simulation parameters in serialized format.
Declaration
public string SimulationParams { get; set; }
  Property Value
| Type | Description | 
|---|---|
| string | 
Summary
Short summary string for the Evaluation. May be null.
Declaration
public string? Summary { get; set; }
  Property Value
| Type | Description | 
|---|---|
| string | 
UserData
Additional optional data, specified by the user.
Declaration
public string UserData { get; set; }
  Property Value
| Type | Description | 
|---|---|
| string | 
Methods
Create(WMPrincipal, SimulationArgs, WMAppDbContext)
Creates a SimulationDTO from the provided data.
Declaration
public static Task<Simulation> Create(WMPrincipal principal, SimulationArgs args, WMAppDbContext context)
  Parameters
| Type | Name | Description | 
|---|---|---|
| WMPrincipal | principal | The principal of the directory  | 
      
| SimulationArgs | args | The SimulationArgs to create with.  | 
      
| WMAppDbContext | context | The DbContext  | 
      
Returns
| Type | Description | 
|---|---|
| Task<Simulation> | 
Exceptions
| Type | Condition | 
|---|---|
| Exception | 
Delete(WMPrincipal, string, WMAppDbContext)
Deletes the SimulationDTO with the provided id.
Declaration
public static Task Delete(WMPrincipal principal, string id, WMAppDbContext context)
  Parameters
| Type | Name | Description | 
|---|---|---|
| WMPrincipal | principal | The principal of the directory  | 
      
| string | id | The id of the entity  | 
      
| WMAppDbContext | context | The DbContext  | 
      
Returns
| Type | Description | 
|---|---|
| Task | 
Exceptions
| Type | Condition | 
|---|---|
| Exception | 
FromModel()
Declaration
public override void FromModel()
  Overrides
Get(WMPrincipal, string, WMAppDbContext)
Returns SimulationDTO with id, throws exception if does not exist.
Declaration
public static Task<SimulationDTO> Get(WMPrincipal principal, string id, WMAppDbContext context)
  Parameters
| Type | Name | Description | 
|---|---|---|
| WMPrincipal | principal | |
| string | id | The id of the entity  | 
      
| WMAppDbContext | context | 
Returns
| Type | Description | 
|---|---|
| Task<SimulationDTO> | 
Exceptions
| Type | Condition | 
|---|---|
| Exception | 
GetAll(WMPrincipal, WMAppDbContext)
Returns all Simulation owned by principal.
Declaration
public static Task<IEnumerable<SimulationDTO>> GetAll(WMPrincipal principal, WMAppDbContext context)
  Parameters
| Type | Name | Description | 
|---|---|---|
| WMPrincipal | principal | The principal  | 
      
| WMAppDbContext | context | 
Returns
| Type | Description | 
|---|---|
| Task<IEnumerable<SimulationDTO>> | 
Exceptions
| Type | Condition | 
|---|---|
| Exception | 
ResourceDefinition()
The resource operation definition for this asset.
Declaration
public static WMResourceOperationsDefinition ResourceDefinition()
  Returns
| Type | Description | 
|---|---|
| WMResourceOperationsDefinition | 
Update(WMPrincipal, string, SimulationArgs, WMAppDbContext)
Updates the specified SimulationDTO from the provided data.
Declaration
public static Task Update(WMPrincipal principal, string id, SimulationArgs args, WMAppDbContext context)
  Parameters
| Type | Name | Description | 
|---|---|---|
| WMPrincipal | principal | The principal of the directory  | 
      
| string | id | The id of the entity  | 
      
| SimulationArgs | args | The SimulationArgs to update with.  | 
      
| WMAppDbContext | context | The DbContext  | 
      
Returns
| Type | Description | 
|---|---|
| Task | 
Exceptions
| Type | Condition | 
|---|---|
| Exception | 
UpdateModel(WMPrincipal, DbContext, object[]?)
Declaration
public override Task<Simulation> UpdateModel(WMPrincipal principal, DbContext context, object[]? data = null)
  Parameters
| Type | Name | Description | 
|---|---|---|
| WMPrincipal | principal | |
| DbContext | context | |
| object[] | data | 
Returns
| Type | Description | 
|---|---|
| Task<Simulation> |