Class WMDataReaderDTO
Data Transfer Object proxy for a WMDataReader.
Inherited Members
Namespace: Quantellia.WMServer.Asset.DataBinding
Assembly: WMServer.dll
Syntax
[PrimaryKey("ID", new string[] { "Version" })]
public class WMDataReaderDTO : WMAssetBaseDTO<WMDataReader>, IWMAssetBaseDTO, IWMVersionableAsset, IWMOwnableResource, IWMResource, IDbEntity, IWMEntity
Constructors
WMDataReaderDTO()
Constructor for WMDataReaderDTO
Declaration
public WMDataReaderDTO()
WMDataReaderDTO(string)
Constructor for WMDataReaderDTO, with specified ID
Declaration
public WMDataReaderDTO(string ID)
Parameters
Type | Name | Description |
---|---|---|
string | ID |
Properties
Action
The action performed by the DataReader
Declaration
public int Action { get; set; }
Property Value
Type | Description |
---|---|
int |
DataSourceID
ID for this DataReader's DataSource
Declaration
public string DataSourceID { get; set; }
Property Value
Type | Description |
---|---|
string |
SourceString
The command string for the query.
Declaration
public string SourceString { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
Clone(WMPrincipal, WMAssetIdentifier, VersionCreateArgs?, WMAppDbContext)
Clones the specified asset with an iterated name "AssetName (1), etc... ", iterates the version number.
Declaration
public static Task<WMDataReaderDTO> 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<WMDataReaderDTO> |
Exceptions
Type | Condition |
---|---|
Exception |
Commit(WMPrincipal, WMAssetIdentifier, WMAppDbContext)
Commits the specified asset 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, WMDataReaderDTO, WMAppDbContext)
Create a new WMDataReaderDTO from the provided data.
Declaration
public static Task<WMDataReader> Create(WMPrincipal principal, WMDataReaderDTO a_dto, WMAppDbContext context)
Parameters
Type | Name | Description |
---|---|---|
WMPrincipal | principal | The owner of the data reader |
WMDataReaderDTO | a_dto | The OpenDIDataReader providing information for the WMDataReaderDTOto be created. |
WMAppDbContext | context | The DbContext |
Returns
Type | Description |
---|---|
Task<WMDataReader> |
Exceptions
Type | Condition |
---|---|
Exception |
Delete(WMPrincipal, WMAssetIdentifier, WMAppDbContext)
Delete the WMDataReaderDTO 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 WMDataReaderDTO to be deleted. |
WMAppDbContext | context | The DbContext |
Returns
Type | Description |
---|---|
Task |
Exceptions
Type | Condition |
---|---|
Exception |
Evaluate(WMPrincipal, WMAssetIdentifier, DataReaderArgs, WMAppDbContext)
Performs an evaluation on an existing DataReader, or a temporary one created from the arguments of the body DataReaderArgs.
Declaration
public static Task<ElementValue> Evaluate(WMPrincipal principal, WMAssetIdentifier identifier, DataReaderArgs args, WMAppDbContext context)
Parameters
Type | Name | Description |
---|---|---|
WMPrincipal | principal | |
WMAssetIdentifier | identifier | |
DataReaderArgs | args | |
WMAppDbContext | context |
Returns
Type | Description |
---|---|
Task<ElementValue> |
FromModel()
Create this instance by reading properties from a WMDataReader
Declaration
public override void FromModel()
Overrides
Get(WMPrincipal, WMAssetIdentifier, WMAppDbContext?, Expression<Func<WMDataReaderDTO, WMDataReaderDTO>>)
Gets the WMDataReaderDTO instance with the specified id. Ensures ownership.
Declaration
public static Task<WMDataReaderDTO> Get(WMPrincipal principal, WMAssetIdentifier identifier, WMAppDbContext? context = null, Expression<Func<WMDataReaderDTO, WMDataReaderDTO>> propertySelector = null)
Parameters
Type | Name | Description |
---|---|---|
WMPrincipal | principal | |
WMAssetIdentifier | identifier | |
WMAppDbContext | context | |
Expression<Func<WMDataReaderDTO, WMDataReaderDTO>> | propertySelector | An optional expression that allows additional mapping of the database DTO object to the instance DTO object. (i.e. excluding DocumentData and DocumentEditedText from WMDocumentDTO, which requires excessive time and bandwidth. An example of this can be found in Get(WMPrincipal, WMAssetIdentifier, WMAppDbContext?, Expression<Func<WMDocumentDTO, WMDocumentDTO>>)) |
Returns
Type | Description |
---|---|
Task<WMDataReaderDTO> |
GetFromDirectory(WMPrincipal, WMAssetIdentifier, int, WMAppDbContext, Expression<Func<WMDataReaderDTO, WMDataReaderDTO>>)
Gets a listing of the specified WMDataReaderDTO to the recursion depth specified with the ID/Dir of a WMAssetDirectory as input.
Declaration
public static Task<IEnumerable<WMDataReaderDTO>> GetFromDirectory(WMPrincipal principal, WMAssetIdentifier identifier = null, int recursionDepth = 0, WMAppDbContext context = null, Expression<Func<WMDataReaderDTO, WMDataReaderDTO>> propertySelector = null)
Parameters
Type | Name | Description |
---|---|---|
WMPrincipal | principal | The owner of the data readers being requested. |
WMAssetIdentifier | identifier | Specification of the directory under which to retrieve WMDataReaderDTO |
int | recursionDepth | Depth to which the directory subtrees under the specified directory should be traversed. |
WMAppDbContext | context | Optional reference to a WMAppDbContext instance. |
Expression<Func<WMDataReaderDTO, WMDataReaderDTO>> | propertySelector | An optional expression that allows additional mapping of the database DTO object to the instance DTO object. (i.e. excluding DocumentData and DocumentEditedText from WMDocumentDTO, which requires excessive time and bandwidth. An example of this can be found in Get(WMPrincipal, WMAssetIdentifier, WMAppDbContext?, Expression<Func<WMDocumentDTO, WMDocumentDTO>>)) |
Returns
Type | Description |
---|---|
Task<IEnumerable<WMDataReaderDTO>> |
ResourceDefinition()
The resource operation definition for this asset.
Declaration
public static WMResourceOperationsDefinition ResourceDefinition()
Returns
Type | Description |
---|---|
WMResourceOperationsDefinition |
Update(WMPrincipal, WMAssetIdentifier, WMDataReaderDTO, WMAppDbContext)
Updates the specified WMDataReaderDTO from the provided data.
Declaration
public static Task Update(WMPrincipal principal, WMAssetIdentifier identifier, WMDataReaderDTO a_dto, WMAppDbContext context)
Parameters
Type | Name | Description |
---|---|---|
WMPrincipal | principal | The owner of the directory |
WMAssetIdentifier | identifier | The identifier of the directory |
WMDataReaderDTO | a_dto | The WMDataReaderDTO to be updated. |
WMAppDbContext | context | The DbContext |
Returns
Type | Description |
---|---|
Task |
Exceptions
Type | Condition |
---|---|
Exception |
UpdateModel(WMPrincipal, DbContext, object[]?)
Updates and returns the contained WMDataReader.
Declaration
public override Task<WMDataReader> UpdateModel(WMPrincipal principal, DbContext context, object[]? data = null)
Parameters
Type | Name | Description |
---|---|---|
WMPrincipal | principal | |
DbContext | context | |
object[] | data |
Returns
Type | Description |
---|---|
Task<WMDataReader> |
Overrides
Versions(WMPrincipal, WMAssetIdentifier, WMAppDbContext)
Gets all versions of the specified asset.
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 |