Class ToManyRelation<TRelation>
Defines a relation that is associated with many entities.
Namespace: StylelabsStylelabs.MSdkStylelabs.M.Sdk.ModelsTypedFields
Assembly: Stylelabs.M.Sdk.dll
Syntax
RequestResponse
public class ToManyRelation<TRelation> where TRelation : class, IToManyRelation
Type Parameters
Name | Description |
---|---|
TRelation |
The type of the relation. |
Constructors
ToManyRelation(IMClient, TypedEntityWrapper, string)
Initializes a new instance of the ToManyRelation<TRelation> class.
Declaration
RequestResponse
public ToManyRelation(IMClient client, TypedEntityWrapper wrapper, string relationName)
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
RequestResponse
protected readonly IMClient Client
Field Value
Type | Description |
---|---|
IMClient |
Relation
The relation.
Declaration
RequestResponse
protected readonly TRelation Relation
Field Value
Type | Description |
---|---|
TRelation |
Properties
Ids
Gets or sets the value of the relation.
Declaration
RequestResponse
public virtual IList<long> Ids { get; set; }
Property Value
Type | Description |
---|---|
IList<>long |
Methods
GetEntitiesAsync(EntityLoadConfiguration)
Gets the related entities as an IEntity.
Declaration
RequestResponse
public Task<IList<IEntity>> GetEntitiesAsync(EntityLoadConfiguration loadConfiguration = null)
Parameters
Type | Name | Description |
---|---|---|
EntityLoadConfiguration | loadConfiguration |
Returns
GetEntitiesAsync<TEntity>(EntityLoadConfiguration)
Gets the related entities as a typed ITypedEntity.
Declaration
RequestResponse
public Task<IList<TEntity>> GetEntitiesAsync<TEntity>(EntityLoadConfiguration loadConfiguration = null) where TEntity : ITypedEntity
Parameters
Type | Name | Description |
---|---|---|
EntityLoadConfiguration | loadConfiguration |
Returns
Type | Description |
---|---|
Task<>IList<> |
A list of IEntity. |
Type Parameters
Name | Description |
---|---|
TEntity |
The type of the entity. |