Class FluentEntities
Provides access to entities in a fluent way.
Inheritance
Namespace: Stylelabs.M.Sdk.Fluent.Wrappers
Assembly: Stylelabs.M.Sdk.Fluent.dll
Syntax
public class FluentEntities : object
Constructors
FluentEntities(IEntitiesClient, ITypedEntityFactory, IEntityLoadConfiguration)
Initializes a new instance of the FluentEntities class.
Declaration
public FluentEntities(IEntitiesClient entitiesClient, ITypedEntityFactory typedEntityFactory, IEntityLoadConfiguration entityLoadConfiguration)
Parameters
Type | Name | Description |
---|---|---|
IEntitiesClient | entitiesClient | The IEntitiesClient instance. |
ITypedEntityFactory | typedEntityFactory | The ITypedEntityFactory instance. |
IEntityLoadConfiguration | entityLoadConfiguration |
Methods
Get(Int64)
Gets the FluentEntity instance with the specified id
.
Declaration
public FluentEntity Get(long id)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | 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
public FluentEntity Get(string identifier)
Parameters
Type | Name | Description |
---|---|---|
System.String | identifier | The identifier of the entity to get. |
Returns
Type | Description |
---|---|
FluentEntity | The entity or null when it was not found. |
Get<TTypedEntity>(Int64)
Gets the typed entity instance with the specified id
.
Declaration
public TTypedEntity Get<TTypedEntity>(long id)
where TTypedEntity : ITypedEntity
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | 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 |
Get<TTypedEntity>(String)
Gets the typed entity instance with the specified identifier
.
Declaration
public TTypedEntity Get<TTypedEntity>(string identifier)
where TTypedEntity : ITypedEntity
Parameters
Type | Name | Description |
---|---|---|
System.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 |
GetByDefinition(String, Int32, Int32)
Queries for entities of the specified definition.
Declaration
public IEnumerable<FluentEntity> GetByDefinition(string definitionName, int skip = null, int take = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | definitionName | The name of the definition to get the entities for (case insensitive). |
System.Int32 | skip | Skip specified number of entities. If no value is specified, no items will be skipped. |
System.Int32 | 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(Int64[])
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
public IEnumerable<FluentEntity> GetMany(long[] ids)
Parameters
Type | Name | Description |
---|---|---|
System.Int64[] | 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
public IEnumerable<FluentEntity> GetMany(string[] identifiers)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | identifiers | The identifiers of the entities to get. |
Returns
Type | Description |
---|---|
IEnumerable<FluentEntity> | A (non-null) list of FluentEntity. |
Can we improve this article ? Provide feedback