Class OpenBiEntityExtensions
Extension methods for base entities and entities.
Inheritance
Namespace: BiExcellence.OpenBi.Api.Commands.Entities
Assembly: BiExcellence.OpenBi.Api.Entity.dll
Syntax
public static class OpenBiEntityExtensions
Methods
AssignTableAttributeToBaseEntityAsync(IOpenBiSession, ITableAttribute, IBaseEntity, CancellationToken)
Assigns a table attribute to a base entity.
Declaration
public static Task AssignTableAttributeToBaseEntityAsync(this IOpenBiSession session, ITableAttribute tableAttribute, IBaseEntity baseEntity, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
ITableAttribute | tableAttribute | The table attribute. |
IBaseEntity | baseEntity | The base entity. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
AssignTableAttributeToBaseEntityAsync(IOpenBiSession, ITableAttribute, string, CancellationToken)
Assigns a table attribute to a base entity.
Declaration
public static Task AssignTableAttributeToBaseEntityAsync(this IOpenBiSession session, ITableAttribute tableAttribute, string baseEntityId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session |
ITableAttribute | tableAttribute | The table attribute. |
string | baseEntityId | The base entity id. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
AssignTableAttributeToBaseEntityAsync(IOpenBiSession, string, IBaseEntity, CancellationToken)
Assigns a table attribute to a base entity.
Declaration
public static Task AssignTableAttributeToBaseEntityAsync(this IOpenBiSession session, string tableAttributeId, IBaseEntity baseEntity, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | tableAttributeId | The table attribute id. |
IBaseEntity | baseEntity | The base entity. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
AssignTableAttributeToBaseEntityAsync(IOpenBiSession, string, string, CancellationToken)
Assigns a table attribute to a base entity.
Declaration
public static Task AssignTableAttributeToBaseEntityAsync(this IOpenBiSession session, string tableAttributeId, string baseEntityId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | tableAttributeId | The table attribute id. |
string | baseEntityId | The base entity id. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
CreateBaseEntityAsync(IOpenBiSession, IBaseEntity, CancellationToken)
Creates or updates a base entity.
Declaration
public static Task CreateBaseEntityAsync(this IOpenBiSession session, IBaseEntity baseEntity, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
IBaseEntity | baseEntity | The base entity. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
CreateEntityAsync(IOpenBiSession, IBaseEntity, IEntity, CancellationToken)
Creates or updates an entity.
Declaration
public static Task CreateEntityAsync(this IOpenBiSession session, IBaseEntity baseEntity, IEntity entity, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
IBaseEntity | baseEntity | The base entity. |
IEntity | entity | The entity. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
CreateEntityAsync(IOpenBiSession, string, IEntity, CancellationToken)
Creates or updates an entity.
Declaration
public static Task CreateEntityAsync(this IOpenBiSession session, string baseEntityId, IEntity entity, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | baseEntityId | The base entity id. |
IEntity | entity | The entity. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
DeleteBaseEntitiesAsync(IOpenBiSession, IEnumerable<IBaseEntity>, CancellationToken)
Deletes base entities.
Declaration
public static Task DeleteBaseEntitiesAsync(this IOpenBiSession session, IEnumerable<IBaseEntity> baseEntities, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
IEnumerable<IBaseEntity> | baseEntities | The base entities. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
DeleteBaseEntitiesAsync(IOpenBiSession, IEnumerable<string>, CancellationToken)
Deletes base entities by id.
Declaration
public static Task DeleteBaseEntitiesAsync(this IOpenBiSession session, IEnumerable<string> baseEntityIds, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
IEnumerable<string> | baseEntityIds | The base entity ids. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
DeleteBaseEntityAsync(IOpenBiSession, IBaseEntity, CancellationToken)
Deletes a base entity.
Declaration
public static Task DeleteBaseEntityAsync(this IOpenBiSession session, IBaseEntity baseEntity, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
IBaseEntity | baseEntity | The base entity. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
DeleteBaseEntityAsync(IOpenBiSession, string, CancellationToken)
Deletes a base entity by id.
Declaration
public static Task DeleteBaseEntityAsync(this IOpenBiSession session, string baseEntityId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | baseEntityId | The base entity id. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
DeleteEntitiesAsync(IOpenBiSession, IBaseEntity, IEnumerable<IEntity>, CancellationToken)
Deletes entities for a base entity.
Declaration
public static Task DeleteEntitiesAsync(this IOpenBiSession session, IBaseEntity baseEntity, IEnumerable<IEntity> entities, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
IBaseEntity | baseEntity | The base entity. |
IEnumerable<IEntity> | entities | The entities. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
DeleteEntitiesAsync(IOpenBiSession, string, IEnumerable<string>, CancellationToken)
Deletes entities by id for a base entity.
Declaration
public static Task DeleteEntitiesAsync(this IOpenBiSession session, string baseEntityId, IEnumerable<string> entityIds, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | baseEntityId | The base entity id. |
IEnumerable<string> | entityIds | The entity ids. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
DeleteEntityAsync(IOpenBiSession, IBaseEntity, IEntity, CancellationToken)
Deletes an entity for a base entity.
Declaration
public static Task DeleteEntityAsync(this IOpenBiSession session, IBaseEntity baseEntity, IEntity entity, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
IBaseEntity | baseEntity | The base entity. |
IEntity | entity | The entity. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
DeleteEntityAsync(IOpenBiSession, string, string, CancellationToken)
Deletes an entity by id for a base entity.
Declaration
public static Task DeleteEntityAsync(this IOpenBiSession session, string baseEntityId, string id, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | baseEntityId | The base entity id. |
string | id | The entity id. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
GetBaseEntities(IOpenBiSession, IEnumerable<ITableAttribute>)
Returns base entities.
Declaration
public static IListRequest<IBaseEntity> GetBaseEntities(this IOpenBiSession session, IEnumerable<ITableAttribute> attributes)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
IEnumerable<ITableAttribute> | attributes | The table attributes. |
Returns
Type | Description |
---|---|
IListRequest<IBaseEntity> |
GetBaseEntities(IOpenBiSession, IEnumerable<string>?)
Returns base entities.
Declaration
public static IListRequest<IBaseEntity> GetBaseEntities(this IOpenBiSession session, IEnumerable<string>? attributes)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
IEnumerable<string> | attributes | The table attribute ids. |
Returns
Type | Description |
---|---|
IListRequest<IBaseEntity> |
GetBaseEntities(IOpenBiSession)
Returns base entities.
Declaration
public static IListRequest<IBaseEntity> GetBaseEntities(this IOpenBiSession session)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
Returns
Type | Description |
---|---|
IListRequest<IBaseEntity> |
GetBaseEntityByIdAsync(IOpenBiSession, string, IEnumerable<ITableAttribute>, CancellationToken)
Returns a base entity by its id.
Declaration
public static Task<IBaseEntityAssignment?> GetBaseEntityByIdAsync(this IOpenBiSession session, string id, IEnumerable<ITableAttribute> attributes, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | id | The base entity id. |
IEnumerable<ITableAttribute> | attributes | The table attributes. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IBaseEntityAssignment> |
GetBaseEntityByIdAsync(IOpenBiSession, string, IEnumerable<string>?, CancellationToken)
Returns a base entity by its id.
Declaration
public static Task<IBaseEntityAssignment?> GetBaseEntityByIdAsync(this IOpenBiSession session, string id, IEnumerable<string>? attributes, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | id | The base entity id. |
IEnumerable<string> | attributes | The table attribute ids. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IBaseEntityAssignment> |
GetBaseEntityByIdAsync(IOpenBiSession, string, CancellationToken)
Returns a base entity by its id.
Declaration
public static Task<IBaseEntityAssignment?> GetBaseEntityByIdAsync(this IOpenBiSession session, string id, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | id | The base entity id. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IBaseEntityAssignment> |
GetEntities(IOpenBiSession, IBaseEntity, IEnumerable<ITableAttribute>)
Returns entities for a base entity.
Declaration
public static IListRequest<IEntity> GetEntities(this IOpenBiSession session, IBaseEntity baseEntity, IEnumerable<ITableAttribute> attributes)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
IBaseEntity | baseEntity | The base entity. |
IEnumerable<ITableAttribute> | attributes | The table attributes. |
Returns
Type | Description |
---|---|
IListRequest<IEntity> |
GetEntities(IOpenBiSession, IBaseEntity, IEnumerable<string>)
Returns entities for a base entity.
Declaration
public static IListRequest<IEntity> GetEntities(this IOpenBiSession session, IBaseEntity baseEntity, IEnumerable<string> attributes)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
IBaseEntity | baseEntity | The base entity. |
IEnumerable<string> | attributes | The table attribute ids. |
Returns
Type | Description |
---|---|
IListRequest<IEntity> |
GetEntities(IOpenBiSession, IBaseEntity)
Returns entities for a base entity.
Declaration
public static IListRequest<IEntity> GetEntities(this IOpenBiSession session, IBaseEntity baseEntity)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
IBaseEntity | baseEntity | The base entity. |
Returns
Type | Description |
---|---|
IListRequest<IEntity> |
GetEntities(IOpenBiSession, string, IEnumerable<ITableAttribute>)
Returns entities for a base entity.
Declaration
public static IListRequest<IEntity> GetEntities(this IOpenBiSession session, string baseEntityId, IEnumerable<ITableAttribute> attributes)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | baseEntityId | The base entity id. |
IEnumerable<ITableAttribute> | attributes | The table attributes. |
Returns
Type | Description |
---|---|
IListRequest<IEntity> |
GetEntities(IOpenBiSession, string, IEnumerable<string>)
Returns entities for a base entity.
Declaration
public static IListRequest<IEntity> GetEntities(this IOpenBiSession session, string baseEntityId, IEnumerable<string> attributes)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | baseEntityId | The base entity id. |
IEnumerable<string> | attributes | The table attribute ids. |
Returns
Type | Description |
---|---|
IListRequest<IEntity> |
GetEntities(IOpenBiSession, string)
Returns entities for a base entity.
Declaration
public static IListRequest<IEntity> GetEntities(this IOpenBiSession session, string baseEntityId)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | baseEntityId | The base entity id. |
Returns
Type | Description |
---|---|
IListRequest<IEntity> |
GetEntityByIdAsync(IOpenBiSession, IBaseEntity, string, IEnumerable<ITableAttribute>, CancellationToken)
Returns an entity by its id for a base entity.
Declaration
public static Task<IEntity?> GetEntityByIdAsync(this IOpenBiSession session, IBaseEntity baseEntity, string entityId, IEnumerable<ITableAttribute> attributes, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
IBaseEntity | baseEntity | The base entity. |
string | entityId | The entity id. |
IEnumerable<ITableAttribute> | attributes | The table attributes. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IEntity> |
GetEntityByIdAsync(IOpenBiSession, IBaseEntity, string, IEnumerable<string>, CancellationToken)
Returns an entity by its id for a base entity.
Declaration
public static Task<IEntity?> GetEntityByIdAsync(this IOpenBiSession session, IBaseEntity baseEntity, string entityId, IEnumerable<string> attributes, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
IBaseEntity | baseEntity | The base entity. |
string | entityId | The entity id. |
IEnumerable<string> | attributes | The table attribute ids. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IEntity> |
GetEntityByIdAsync(IOpenBiSession, IBaseEntity, string, CancellationToken)
Returns an entity by its id for a base entity.
Declaration
public static Task<IEntity?> GetEntityByIdAsync(this IOpenBiSession session, IBaseEntity baseEntity, string entityId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
IBaseEntity | baseEntity | The base entity. |
string | entityId | The entity id. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IEntity> |
GetEntityByIdAsync(IOpenBiSession, string, string, IEnumerable<ITableAttribute>, CancellationToken)
Returns an entity by its id for a base entity.
Declaration
public static Task<IEntity?> GetEntityByIdAsync(this IOpenBiSession session, string baseEntityId, string entityId, IEnumerable<ITableAttribute> attributes, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | baseEntityId | The base entity id. |
string | entityId | The entity id. |
IEnumerable<ITableAttribute> | attributes | The table attributes. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IEntity> |
GetEntityByIdAsync(IOpenBiSession, string, string, IEnumerable<string>?, CancellationToken)
Returns an entity by its id for a base entity.
Declaration
public static Task<IEntity?> GetEntityByIdAsync(this IOpenBiSession session, string baseEntityId, string entityId, IEnumerable<string>? attributes, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | baseEntityId | The base entity id. |
string | entityId | The entity id. |
IEnumerable<string> | attributes | The table attribute ids. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IEntity> |
GetEntityByIdAsync(IOpenBiSession, string, string, CancellationToken)
Returns an entity by its id for a base entity.
Declaration
public static Task<IEntity?> GetEntityByIdAsync(this IOpenBiSession session, string baseEntityId, string entityId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | baseEntityId | The base entity id. |
string | entityId | The entity id. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IEntity> |
RemoveTableAttributeFromBaseEntityAsync(IOpenBiSession, ITableAttribute, IBaseEntity, CancellationToken)
Removes a table attribute from a base entity.
Declaration
public static Task RemoveTableAttributeFromBaseEntityAsync(this IOpenBiSession session, ITableAttribute tableAttribute, IBaseEntity baseEntity, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
ITableAttribute | tableAttribute | The table attribute. |
IBaseEntity | baseEntity | The base entity. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
RemoveTableAttributeFromBaseEntityAsync(IOpenBiSession, ITableAttribute, string, CancellationToken)
Removes a table attribute from a base entity.
Declaration
public static Task RemoveTableAttributeFromBaseEntityAsync(this IOpenBiSession session, ITableAttribute tableAttribute, string baseEntityId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
ITableAttribute | tableAttribute | The table attribute. |
string | baseEntityId | The base entity id. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
RemoveTableAttributeFromBaseEntityAsync(IOpenBiSession, string, IBaseEntity, CancellationToken)
Removes a table attribute from a base entity.
Declaration
public static Task RemoveTableAttributeFromBaseEntityAsync(this IOpenBiSession session, string tableAttributeId, IBaseEntity baseEntity, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | tableAttributeId | The table attribute id. |
IBaseEntity | baseEntity | The base entity. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
RemoveTableAttributeFromBaseEntityAsync(IOpenBiSession, string, string, CancellationToken)
Removes a table attribute from a base entity.
Declaration
public static Task RemoveTableAttributeFromBaseEntityAsync(this IOpenBiSession session, string tableAttributeId, string baseEntityId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | tableAttributeId | The table attribute id. |
string | baseEntityId | The base entity id. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |