Class ToOneRelation<TRelation>
Defines a relation that is associated with only one entity.
Namespace: StylelabsStylelabs.MSdkStylelabs.M.Sdk.ModelsTypedFields
Assembly: Stylelabs.M.Sdk.dll
Syntax
Type Parameters
| Name | Description |
|---|---|
| TRelation |
The type of the relation. |
Constructors
ToOneRelation(IMClient, TypedEntityWrapper, string)
Initializes a new instance of the ToOneRelation<TRelation> class.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| IMClient | client |
The IMClient instance. |
| TypedEntityWrapper | wrapper |
The typed entity wrapper. |
| string | relationName |
The property name. |
Fields
Client
The client.
Declaration
Field Value
| Type | Description |
|---|---|
| IMClient |
Relation
The relation.
Declaration
Field Value
| Type | Description |
|---|---|
| TRelation |
Properties
Id
Gets or sets the value of the relation.
Declaration
Property Value
| Type | Description |
|---|---|
| long |
Methods
GetEntityAsync(EntityLoadConfiguration)
Gets the related entity as an IEntity.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| EntityLoadConfiguration | loadConfiguration |
Returns
GetEntityAsync<TEntity>(EntityLoadConfiguration)
Gets the related entity as a typed ITypedEntity.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| EntityLoadConfiguration | loadConfiguration |
Returns
| Type | Description |
|---|---|
| Task<> |
A list of IEntity. |
Type Parameters
| Name | Description |
|---|---|
| TEntity |
The type of the entity. |