Class SubqueryAttribute
Data object subquery attribute
Inherited Members
Namespace: XData.Mapping
Assembly: XData.docfx.dll
Syntax
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
public sealed class SubqueryAttribute : DataSourceAttribute
Examples
Subquery("A", typeof(DocSpecAmounts), "Amount", Grouping = DataGrouping.Sum)
Constructors
| Improve this Doc View SourceSubqueryAttribute(String, Type, String)
Data object subquery attribute
Declaration
public SubqueryAttribute(string alias, Type subqueryType, string propertyName)
Parameters
Type | Name | Description |
---|---|---|
String | alias | Subquery alias |
Type | subqueryType | Object type represents subquery structure |
String | propertyName | Subquery selected property |
Exceptions
Type | Condition |
---|---|
XDataRuntimeException | Subquery alias cannot be null or empty string |
XDataRuntimeException | Object type represents subquery structure cannot be null |
XDataRuntimeException | Subquery selected property cannot be null or empty string |
Properties
| Improve this Doc View SourceAlias
Subquery alias
Declaration
public override string Alias { get; protected set; }
Property Value
Type | Description |
---|---|
String |
Overrides
| Improve this Doc View SourceGrouping
Subquery grouping mode
Declaration
public DataGrouping Grouping { get; set; }
Property Value
Type | Description |
---|---|
DataGrouping |
Remarks
Subquery selected property (see PropertyName) aggregate function
Grouping in subquery mast to be defined by GroupOrder
WARNING! Do not use properties inside grouped subqueries! Use ColumnAttribute instead!
PropertyName
Subquery selected property
Declaration
public string PropertyName { get; }
Property Value
Type | Description |
---|---|
String |
Remarks
Only one property (or column) can be selected from subquery
SubqueryType
Object type represents subquery structure
Declaration
public Type SubqueryType { get; }
Property Value
Type | Description |
---|---|
Type |
Type
Data source type
Declaration
public override DataSourceType Type { get; }
Property Value
Type | Description |
---|---|
DataSourceType | Subquery |
Overrides
| Improve this Doc View SourceTypeId
When implemented in a derived class, gets a unique identifier for this Attribute.
Declaration
public override object TypeId { get; }
Property Value
Type | Description |
---|---|
Object | An Object that is a unique identifier for the attribute. |