Show / Hide Table of Contents

Class WMAssetBaseDTO<T>

Data Transfer Object base class for all WMAssetBase DTOs. This class was implemented to centralize all of the common traits of asset DTOs, and prevent the increase of duplicated code as we add more assets to the file system.

Inheritance
object
DataTransferObject<T>
WMAssetBaseDTO<T>
WMDataReaderDTO
WMDataSourceBaseDTO
WMAssetDirectoryDTO
WMDocumentDTO
WMDocumentIndexDTO
WMLLMDTO
WMModelBaseDTO
Implements
IWMAssetBaseDTO
IDbEntity
IWMEntity
Inherited Members
DataTransferObject<T>.ModelObject
DataTransferObject<T>.SetID(string)
DataTransferObject<T>.CreateModel(WMPrincipal, DbContext, object[])
DataTransferObject<T>.FromModel()
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Quantellia.WMServer.Asset.Base
Assembly: WMServer.dll
Syntax
public abstract class WMAssetBaseDTO<T> : DataTransferObject<T>, IWMAssetBaseDTO, IDbEntity, IWMEntity where T : WMAssetBase, new()
Type Parameters
Name Description
T

Constructors

WMAssetBaseDTO()

Constructor for WMAssetBaseDTO<T>

Declaration
public WMAssetBaseDTO()

WMAssetBaseDTO(string)

Constructor for WMAssetBaseDTO<T> specifying ID

Declaration
public WMAssetBaseDTO(string id)
Parameters
Type Name Description
string id

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 this entity was last updated.

Declaration
public DateTime CreatedDate { get; set; }
Property Value
Type Description
DateTime

Documentation

Longer, formatted description of this entity.

Declaration
public string? Documentation { get; set; }
Property Value
Type Description
string

DocumentationMIMEType

MIME type of Documentation.

Declaration
public string? DocumentationMIMEType { get; set; }
Property Value
Type Description
string

FullPathName

The unique directory for this WMAssetDirectoryDTO

Declaration
public string FullPathName { get; set; }
Property Value
Type Description
string

ID

The ID of this entity.

Declaration
public string ID { 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 of this entity

Declaration
public string? Name { get; set; }
Property Value
Type Description
string

OwnerID

Owner of this entity

Declaration
public string OwnerID { get; set; }
Property Value
Type Description
string

OwnerType

Type of the owner that owns this entity

Declaration
public string OwnerType { get; set; }
Property Value
Type Description
string

ParentID

ID for the Parent

Declaration
public string ParentID { get; set; }
Property Value
Type Description
string

Properties

Custom properties defined by the user

Declaration
[NotMapped]
public Dictionary<string, string> Properties { get; }
Property Value
Type Description
Dictionary<string, string>

PropertiesSerialized

Custom properties defined by the user. Serializes to and from Properties

Declaration
public string PropertiesSerialized { get; set; }
Property Value
Type Description
string

Summary

Short summary of this entity.

Declaration
public string? Summary { get; set; }
Property Value
Type Description
string

Methods

UpdateModel(WMPrincipal, DbContext, object[]?)

Updates the contained WMAssetBase with all base properties..

Declaration
public override Task<T> UpdateModel(WMPrincipal principal, DbContext context, object[]? data = null)
Parameters
Type Name Description
WMPrincipal principal
DbContext context
object[] data
Returns
Type Description
Task<T>
Overrides
DataTransferObject<T>.UpdateModel(WMPrincipal, DbContext, object[])

ValidateDirectory<T_Asset>(WMPrincipal, WMAssetBaseDTO<T_Asset>, WMAppDbContext)

Validates the uniqueness and name correctness of an asset DTO. Throws an exception otherwise.

Declaration
protected static Task ValidateDirectory<T_Asset>(WMPrincipal principal, WMAssetBaseDTO<T_Asset> a_dto, WMAppDbContext context) where T_Asset : WMAssetBase, new()
Parameters
Type Name Description
WMPrincipal principal

The owner of the asset

WMAssetBaseDTO<T_Asset> a_dto

The asset to be validated

WMAppDbContext context

The DbContext

Returns
Type Description
Task
Type Parameters
Name Description
T_Asset

Implements

IWMAssetBaseDTO
IDbEntity
IWMEntity
In this article
Back to top Copyright © 2025 Quantellia LLC.    Version 2.0.0 Revision 399     Last Updated 1/15/2025    DRAFT DOCUMENTATION. SUBJECT TO CHANGE