Class FluentEntities
Provides access to entities in a fluent way.
Inheritance
Namespace: StylelabsStylelabs.MSdkFluentWrappers
Assembly: Stylelabs.M.Sdk.Fluent.dll
Syntax
Constructors
FluentEntities(IEntitiesClient, ITypedEntityFactory, IEntityLoadConfiguration)
Initializes a new instance of the FluentEntities class.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| IEntitiesClient | entitiesClient |
The IEntitiesClient instance. |
| ITypedEntityFactory | typedEntityFactory |
The ITypedEntityFactory instance. |
| IEntityLoadConfiguration | entityLoadConfiguration |
Methods
Get(long)
Gets the FluentEntity instance with the specified id.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| long | id |
The id of the entity to get. |
Returns
| Type | Description |
|---|---|
| FluentEntity |
The entity or null when it was not found. |
Get(string)
Gets the FluentEntity instance with the specified identifier.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| string | identifier |
The identifier of the entity to get. |
Returns
| Type | Description |
|---|---|
| FluentEntity |
The entity or null when it was not found. |
Get<TTypedEntity>(long)
Gets the typed entity instance with the specified id.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| long | id |
The id of the entity to get. |
Returns
| Type | Description |
|---|---|
| TTypedEntity |
The entity or null when it was not found. |
Type Parameters
| Name | Description |
|---|---|
| TTypedEntity |
The type of the typed entity. |
Get<TTypedEntity>(string)
Gets the typed entity instance with the specified identifier.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| string | identifier |
The identifier of the entity to get. |
Returns
| Type | Description |
|---|---|
| TTypedEntity |
The entity or null when it was not found. |
Type Parameters
| Name | Description |
|---|---|
| TTypedEntity |
The type of the typed entity. |
GetByDefinition(string, int, int)
Queries for entities of the specified definition.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| string | definitionName |
The name of the definition to get the entities for (case insensitive). |
| int | skip |
Skip specified number of entities. If no value is specified, no items will be skipped. |
| int | take |
Take only specified number of entities. If no value is specified, the default Take will be used. |
Returns
| Type | Description |
|---|---|
| IEnumerable<>FluentEntity |
A (non-null) list of FluentEntity. |
GetMany(long[])
Gets multiple FluentEntity instances with the specified ids.
The result can have a different ordering and size (when entities don't exist) than the input.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| long | ids |
The ids of the entities to get. |
Returns
| Type | Description |
|---|---|
| IEnumerable<>FluentEntity |
A (non-null) list of FluentEntity. |
GetMany(string[])
Gets multiple FluentEntity instances with the specified identifiers.
The result can have a different ordering and size (when entities don't exist) than the input.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| string | identifiers |
The identifiers of the entities to get. |
Returns
| Type | Description |
|---|---|
| IEnumerable<>FluentEntity |
A (non-null) list of FluentEntity. |