Interface IDataQuery
Read only data source basic interface
Inherited Members
Namespace: XData
Assembly: XData.docfx.dll
Syntax
public interface IDataQuery : IOrderedQueryable, IQueryable, IEnumerable, IDisposable
Properties
| Improve this Doc View SourceAlias
Data repository alias
Declaration
string Alias { get; }
Property Value
Type | Description |
---|---|
String |
Remarks
Default value is data object type name
Context
Data context
Declaration
string Context { get; }
Property Value
Type | Description |
---|---|
String |
Keys
Data query/repository key properties
Declaration
string[] Keys { get; }
Property Value
Type | Description |
---|---|
String[] |
Layer
Data repository layer
Declaration
Guid Layer { get; }
Property Value
Type | Description |
---|---|
Guid |
Remarks
Sharing same layer the data object repositories can interact automatically as parent/child (see ExternalLinkAttribute)
Repositories on different layers but same data object are independent for each other
Repositories on same layer based on same data object is the same repository
Token
Cancellation token
Declaration
CancellationToken Token { get; }
Property Value
Type | Description |
---|---|
CancellationToken |
Variables
Data query/repository/call result variables
Declaration
VariableIndexer Variables { get; }
Property Value
Type | Description |
---|---|
VariableIndexer |
Remarks
Variable values can be used to set the filter values (query/repository)
Variable values can be used in custom logic (repository)
Variables is stored in query/repository/call result instance
Examples
var rep = dataScope.GetRepository<Customer>(variables: new []{"OurCode", "SELF"});
var newInvoice = dataScope.GetRepository<Invoice>().New();
newInvoice.CustomerFrom += rep.First(x => x.Code.CompareVariable(FilterOperation.Equal, "SELF"));