Class Link<TVal, TSrc>
Dictionary link wrapper
Inherited Members
Namespace: XData.Mapping
Assembly: XData.docfx.dll
Syntax
public abstract class Link<TVal, TSrc> : ILink where TVal : IComparable<TVal> where TSrc : class, IDataObject, new()
Type Parameters
Name | Description |
---|---|
TVal | Link value type |
TSrc | Link source type |
Examples
// declaration
[Property("name", "S"),
DictionaryProperty("Name", "DocState"),
DictionaryProperty("Code", "DocStateCode")]
public Link<string, DocState> DocState { get; set; }
// using
newInvoice.DocState += dataScope.GetDictionaryValue<DocState>(x => x.Code == "CREATED");
// is the same as
newInvoice.DocState.Source = dataScope.GetDictionaryValue<DocState>(x => x.Code == "CREATED");
Properties
| Improve this Doc View SourceSource
Dictionary source data object
Declaration
public abstract TSrc Source { set; }
Property Value
Type | Description |
---|---|
TSrc |
Value
Dictionary value
Declaration
public TVal Value { get; protected set; }
Property Value
Type | Description |
---|---|
TVal |
Methods
| Improve this Doc View SourceIsNull()
Check link for null value
Declaration
public bool IsNull()
Returns
Type | Description |
---|---|
Boolean | Link is null |
Key<TKey>(String)
Declaration
public abstract TKey Key<TKey>(string keyProperty)
Parameters
Type | Name | Description |
---|---|---|
String | keyProperty |
Returns
Type | Description |
---|---|
TKey |
Type Parameters
Name | Description |
---|---|
TKey |
Operators
| Improve this Doc View SourceAddition(Link<TVal, TSrc>, TSrc)
Set link source
Declaration
public static Link<TVal, TSrc> operator +(Link<TVal, TSrc> link, TSrc source)
Parameters
Type | Name | Description |
---|---|---|
Link<TVal, TSrc> | link | Link |
TSrc | source | Link source |
Returns
Type | Description |
---|---|
Link<TVal, TSrc> | Updated link |
Implicit(Link<TVal, TSrc> to TVal)
Implicitly returns dictionary value
Declaration
public static implicit operator TVal(Link<TVal, TSrc> val)
Parameters
Type | Name | Description |
---|---|---|
Link<TVal, TSrc> | val | Dictionary property |
Returns
Type | Description |
---|---|
TVal | Value |
Extension Methods
SqlBlockExtensions.SetExpression<TTag, TResult>(TTag, Expression<Func<IBlockQueryAdapter, TResult>>)