Table of Contents

Interface IInternalEntityViewRepository<TEntityView>

Namespace
GroupeIsa.Neos.Application.Persistence
Assembly
GroupeIsa.Neos.Application.Abstractions.dll

Provides the internal functionalities of an entity view persistence.

public interface IInternalEntityViewRepository<TEntityView> : IEntityViewRepository<TEntityView>, IEntityViewRepository where TEntityView : class, IEntityView

Type Parameters

TEntityView

The entity view type.

Inherited Members

Properties

AdditionalDataExpressions

Gets or sets the additional data expressions.

AdditionalDataExpressions AdditionalDataExpressions { get; set; }

Property Value

AdditionalDataExpressions

SearchExpression

Gets or sets the search expression.

Expression<Func<TEntityView, string, bool>>? SearchExpression { get; set; }

Property Value

Expression<Func<TEntityView, string, bool>>

Methods

AddFromExternalSourceAsync(TEntityView, CancellationToken)

Adds an item from an external source.

Task<TEntityView> AddFromExternalSourceAsync(TEntityView entityView, CancellationToken cancellationToken = default)

Parameters

entityView TEntityView

The entity view item.

cancellationToken CancellationToken

A CancellationToken that can be used to cancel the operation.

Returns

Task<TEntityView>

The added entity view item.

AddOrGetInstanceFromExternalSourceAsync(TEntityView?, TEntityView?, CancellationToken)

Adds or gets the optional instance from an external source.

Task<TEntityView?> AddOrGetInstanceFromExternalSourceAsync(TEntityView? destination, TEntityView? source, CancellationToken cancellationToken = default)

Parameters

destination TEntityView

The destination.

source TEntityView

The source.

cancellationToken CancellationToken

A CancellationToken that can be used to cancel the operation.

Returns

Task<TEntityView>

The entity view item.

Remarks

Used to generate EntityViewRepository{TEntityView}.UpdateReferencesAsync. See GroupeIsa.Neos.Generator.ServerSolution.Application.Persistence.AllRepositories.

AddOrGetRequiredInstanceFromExternalSourceAsync(TEntityView, TEntityView, CancellationToken)

Adds or gets the required instance from an external source.

Task<TEntityView> AddOrGetRequiredInstanceFromExternalSourceAsync(TEntityView destination, TEntityView source, CancellationToken cancellationToken = default)

Parameters

destination TEntityView

The destination.

source TEntityView

The source.

cancellationToken CancellationToken

A CancellationToken that can be used to cancel the operation.

Returns

Task<TEntityView>

The entity view item.

Remarks

Used to generate EntityViewRepository{TEntityView}.UpdateReferencesAsync. See GroupeIsa.Neos.Generator.ServerSolution.Application.Persistence.AllRepositories.

AddOrUpdateFromExternalSourceOnEditableReferenceAsync(TEntityView, TEntityView?, CancellationToken)

Adds or updates entity view from external source on editable reference.

Task<TEntityView> AddOrUpdateFromExternalSourceOnEditableReferenceAsync(TEntityView sourceEditableReference, TEntityView? destinationEditableReference, CancellationToken cancellationToken = default)

Parameters

sourceEditableReference TEntityView

The source.

destinationEditableReference TEntityView

The current destination instance.

cancellationToken CancellationToken

A CancellationToken that can be used to cancel the operation.

Returns

Task<TEntityView>

A Task representing the asynchronous operation.

GetPagedListAsync(int, int, EntityViewParameters<TEntityView>, Func<IQueryable<TEntityView>, IQueryable<TEntityView>>?, bool, CancellationToken)

Gets paged entity view items with optional exact total count computation.

Task<IPagedList<TEntityView>> GetPagedListAsync(int skip, int top, EntityViewParameters<TEntityView> parameters, Func<IQueryable<TEntityView>, IQueryable<TEntityView>>? queryCustomization, bool includeTotalCount, CancellationToken cancellationToken)

Parameters

skip int

The number of elements to skip.

top int

The number of elements to return.

parameters EntityViewParameters<TEntityView>

Parameters.

queryCustomization Func<IQueryable<TEntityView>, IQueryable<TEntityView>>

Query customization.

includeTotalCount bool

True to compute the exact total record count; false to avoid the count query.

cancellationToken CancellationToken

A CancellationToken that can be used to cancel the operation.

Returns

Task<IPagedList<TEntityView>>

The paged entity view items.

GetPagedTransformedListAsync(int, int, EntityViewParameters<TEntityView>, Func<IQueryable<TEntityView>, IQueryable<object>>, Func<IQueryable<TEntityView>, IQueryable<TEntityView>>?, CancellationToken)

Gets paged transformed items.

Task<IPagedList<object>> GetPagedTransformedListAsync(int skip, int top, EntityViewParameters<TEntityView> parameters, Func<IQueryable<TEntityView>, IQueryable<object>> queryTransformation, Func<IQueryable<TEntityView>, IQueryable<TEntityView>>? queryCustomizationBeforeTransformation = null, CancellationToken cancellationToken = default)

Parameters

skip int

The number of elements to skip.

top int

The number of elements to return.

parameters EntityViewParameters<TEntityView>

Parameters.

queryTransformation Func<IQueryable<TEntityView>, IQueryable<object>>

The query transformation.

queryCustomizationBeforeTransformation Func<IQueryable<TEntityView>, IQueryable<TEntityView>>

The query customization before the transformation.

cancellationToken CancellationToken

A CancellationToken that can be used to cancel the operation.

Returns

Task<IPagedList<object>>

The entity view items.

ReloadAsync(TEntityView, CancellationToken)

Reloads the entity view item.

Task<Result<TEntityView>> ReloadAsync(TEntityView entityView, CancellationToken cancellationToken = default)

Parameters

entityView TEntityView

The entity view item to reload.

cancellationToken CancellationToken

A CancellationToken that can be used to cancel the operation.

Returns

Task<Result<TEntityView>>

A result that contains the reloaded entity view item or an error if the reload has failed.

RemoveFromCache(TEntityView)

Removes an item from the cache.

void RemoveFromCache(TEntityView entityView)

Parameters

entityView TEntityView

The item to remove.

UpdateFromExternalSourceAsync(object, TEntityView, CancellationToken)

Finds if destination exists according to the key and updates from an external source.

Task<Result<TEntityView>> UpdateFromExternalSourceAsync(object key, TEntityView source, CancellationToken cancellationToken = default)

Parameters

key object

The item key.

source TEntityView

The new item content.

cancellationToken CancellationToken

A CancellationToken that can be used to cancel the operation.

Returns

Task<Result<TEntityView>>

true if the item was found and updated; otherwise false.

UpdateFromExternalSourceAsync(TEntityView, TEntityView, CancellationToken)

Updates an item from an external source.

Task<TEntityView> UpdateFromExternalSourceAsync(TEntityView source, TEntityView destination, CancellationToken cancellationToken = default)

Parameters

source TEntityView

The new item content.

destination TEntityView

The item to update.

cancellationToken CancellationToken

A CancellationToken that can be used to cancel the operation.

Returns

Task<TEntityView>

true if the item was found and updated; otherwise false.