Class FluentEntities

Provides access to entities in a fluent way.

Inheritance
object
FluentEntities
Namespace: StylelabsStylelabs.MSdkFluentWrappers
Assembly: Stylelabs.M.Sdk.Fluent.dll
Syntax
RequestResponse
public class FluentEntities

Constructors

FluentEntities(IEntitiesClient, ITypedEntityFactory, IEntityLoadConfiguration)

Initializes a new instance of the FluentEntities class.

Declaration
RequestResponse
public FluentEntities(IEntitiesClient entitiesClient, ITypedEntityFactory typedEntityFactory, IEntityLoadConfiguration entityLoadConfiguration)
Parameters
TypeNameDescription
IEntitiesCliententitiesClient

The IEntitiesClient instance.

ITypedEntityFactorytypedEntityFactory

The ITypedEntityFactory instance.

IEntityLoadConfigurationentityLoadConfiguration

The IEntityLoadConfiguration.

Methods

Get(long)

Gets the FluentEntity instance with the specified id.

Declaration
RequestResponse
public FluentEntity Get(long id)
Parameters
TypeNameDescription
longid

The id of the entity to get.

Returns
TypeDescription
FluentEntity

The entity or null when it was not found.

Get(string)

Gets the FluentEntity instance with the specified identifier.

Declaration
RequestResponse
public FluentEntity Get(string identifier)
Parameters
TypeNameDescription
stringidentifier

The identifier of the entity to get.

Returns
TypeDescription
FluentEntity

The entity or null when it was not found.

Get<TTypedEntity>(long)

Gets the typed entity instance with the specified id.

Declaration
RequestResponse
public TTypedEntity Get<TTypedEntity>(long id) where TTypedEntity : ITypedEntity
Parameters
TypeNameDescription
longid

The id of the entity to get.

Returns
TypeDescription
TTypedEntity

The entity or null when it was not found.

Type Parameters
NameDescription
TTypedEntity

The type of the typed entity.

Get<TTypedEntity>(string)

Gets the typed entity instance with the specified identifier.

Declaration
RequestResponse
public TTypedEntity Get<TTypedEntity>(string identifier) where TTypedEntity : ITypedEntity
Parameters
TypeNameDescription
stringidentifier

The identifier of the entity to get.

Returns
TypeDescription
TTypedEntity

The entity or null when it was not found.

Type Parameters
NameDescription
TTypedEntity

The type of the typed entity.

GetByDefinition(string, int, int)

Queries for entities of the specified definition.

Declaration
RequestResponse
public IEnumerable<FluentEntity> GetByDefinition(string definitionName, int skip = null, int take = null)
Parameters
TypeNameDescription
stringdefinitionName

The name of the definition to get the entities for (case insensitive).

intskip

Skip specified number of entities. If no value is specified, no items will be skipped.

inttake

Take only specified number of entities. If no value is specified, the default Take will be used.

Returns
TypeDescription
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
RequestResponse
public IEnumerable<FluentEntity> GetMany(long[] ids)
Parameters
TypeNameDescription
longids

The ids of the entities to get.

Returns
TypeDescription
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
RequestResponse
public IEnumerable<FluentEntity> GetMany(string[] identifiers)
Parameters
TypeNameDescription
stringidentifiers

The identifiers of the entities to get.

Returns
TypeDescription
IEnumerable<>FluentEntity

A (non-null) list of FluentEntity.

Do you have some feedback for us?

If you have suggestions for improving this article,