Class WMDataReaderDTO
Data Transfer Object proxy for a WMDataReader.
Inherited Members
Namespace: Quantellia.WMServer.Asset.DataBinding
Assembly: WMServer.dll
Syntax
public class WMDataReaderDTO : WMAssetBaseDTO<WMDataReader>, IWMAssetBaseDTO, 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
Create(WMPrincipal, WMDataReaderDTO, WMAppDbContext, string, string)
Create a new WMDataReaderDTO from the provided data.
Declaration
public static Task<WMDataReader> Create(WMPrincipal principal, WMDataReaderDTO rdrDTO, WMAppDbContext context, string assetOwnerType, string assetOwnerID)
Parameters
Type | Name | Description |
---|---|---|
WMPrincipal | principal | The owner of the data reader |
WMDataReaderDTO | rdrDTO | The WMDataReaderDTO to be created. |
WMAppDbContext | context | The DbContext |
string | assetOwnerType | TYpe of the WMPrincipal that owns the Asset. |
string | assetOwnerID | ID of the WMPrincipal that owns the Asset. |
Returns
Type | Description |
---|---|
Task<WMDataReader> |
Exceptions
Type | Condition |
---|---|
Exception |
Delete(WMPrincipal, string, WMAppDbContext)
Delete the WMDataReaderDTO with the corresponding ID or FullPathName
Declaration
public static Task Delete(WMPrincipal principal, string dir, WMAppDbContext context)
Parameters
Type | Name | Description |
---|---|---|
WMPrincipal | principal | The owner of the directory |
string | dir | The Id or FullPathName of the corresponding WMDataReaderDTO to be deleted. |
WMAppDbContext | context | The DbContext |
Returns
Type | Description |
---|---|
Task |
Exceptions
Type | Condition |
---|---|
Exception |
Evaluate(WMPrincipal, string, 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, string dir, DataReaderArgs args, WMAppDbContext context)
Parameters
Type | Name | Description |
---|---|---|
WMPrincipal | principal | |
string | dir | |
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, string, WMAppDbContext?)
Gets the WMDataReaderDTO instance with the specified id. Ensures ownership.
Declaration
public static Task<WMDataReaderDTO> Get(WMPrincipal principal, string dirOrID, WMAppDbContext? context = null)
Parameters
Type | Name | Description |
---|---|---|
WMPrincipal | principal | |
string | dirOrID | |
WMAppDbContext | context |
Returns
Type | Description |
---|---|
Task<WMDataReaderDTO> |
Get(WMPrincipal, string?, int, WMAppDbContext?)
Gets a listing of the specified WMDataReaderDTO to the recursion depth specified.
Declaration
public static Task<IEnumerable<WMDataReaderDTO>> Get(WMPrincipal principal, string? dir = null, int recursionDepth = 0, WMAppDbContext? context = null)
Parameters
Type | Name | Description |
---|---|---|
WMPrincipal | principal | The owner of the Asset Directory being requested. |
string | dir | 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. |
Returns
Type | Description |
---|---|
Task<IEnumerable<WMDataReaderDTO>> |
GetFromDirectory(WMPrincipal, string, int, WMAppDbContext)
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, string dir = null, int recursionDepth = 0, WMAppDbContext context = null)
Parameters
Type | Name | Description |
---|---|---|
WMPrincipal | principal | The owner of the data readers being requested. |
string | dir | 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. |
Returns
Type | Description |
---|---|
Task<IEnumerable<WMDataReaderDTO>> |
Update(WMPrincipal, string, WMDataReaderDTO, WMAppDbContext)
Updates the specified WMDataReaderDTO from the provided data.
Declaration
public static Task Update(WMPrincipal principal, string id, WMDataReaderDTO rdrDTO, WMAppDbContext context)
Parameters
Type | Name | Description |
---|---|---|
WMPrincipal | principal | The owner of the directory |
string | id | The id or fullpath of the directory |
WMDataReaderDTO | rdrDTO | 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> |