Class AbstractKeyReadOnlyAppService<TEntity, TGetOutputDto, TGetListOutputDto, TKey, TGetListInput>
Inheritance
System.Object
AbstractKeyReadOnlyAppService<TEntity, TGetOutputDto, TGetListOutputDto, TKey, TGetListInput>
Implements
IAvoidDuplicateCrossCuttingConcerns
IUnitOfWorkEnabled
IAuditingEnabled
ITransientDependency
IReadOnlyAppService<TGetOutputDto, TGetListOutputDto, TKey, TGetListInput>
IRemoteService
Inherited Members
Namespace: Volo.Abp.Application.Services
Assembly: Volo.Abp.Ddd.Application.dll
Syntax
public abstract class AbstractKeyReadOnlyAppService<TEntity, TGetOutputDto, TGetListOutputDto, TKey, TGetListInput> : ApplicationService, IAvoidDuplicateCrossCuttingConcerns, IValidationEnabled, IUnitOfWorkEnabled, IAuditingEnabled, ITransientDependency, IReadOnlyAppService<TGetOutputDto, TGetListOutputDto, TKey, TGetListInput>, IApplicationService, IRemoteService where TEntity : class, IEntity
Type Parameters
| Name | Description |
|---|---|
| TEntity | |
| TGetOutputDto | |
| TGetListOutputDto | |
| TKey | |
| TGetListInput |
Constructors
AbstractKeyReadOnlyAppService(IReadOnlyRepository<TEntity>)
Declaration
protected AbstractKeyReadOnlyAppService(IReadOnlyRepository<TEntity> repository)
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyRepository<TEntity> | repository |
Properties
GetListPolicyName
Declaration
protected virtual string GetListPolicyName { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
GetPolicyName
Declaration
protected virtual string GetPolicyName { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
ReadOnlyRepository
Declaration
protected IReadOnlyRepository<TEntity> ReadOnlyRepository { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyRepository<TEntity> |
Methods
ApplyDefaultSorting(IQueryable<TEntity>)
Applies sorting if no sorting specified but a limited result requested.
Declaration
protected virtual IQueryable<TEntity> ApplyDefaultSorting(IQueryable<TEntity> query)
Parameters
| Type | Name | Description |
|---|---|---|
| IQueryable<TEntity> | query | The query. |
Returns
| Type | Description |
|---|---|
| IQueryable<TEntity> |
ApplyPaging(IQueryable<TEntity>, TGetListInput)
Should apply paging if needed.
Declaration
protected virtual IQueryable<TEntity> ApplyPaging(IQueryable<TEntity> query, TGetListInput input)
Parameters
| Type | Name | Description |
|---|---|---|
| IQueryable<TEntity> | query | The query. |
| TGetListInput | input | The input. |
Returns
| Type | Description |
|---|---|
| IQueryable<TEntity> |
ApplySorting(IQueryable<TEntity>, TGetListInput)
Should apply sorting if needed.
Declaration
protected virtual IQueryable<TEntity> ApplySorting(IQueryable<TEntity> query, TGetListInput input)
Parameters
| Type | Name | Description |
|---|---|---|
| IQueryable<TEntity> | query | The query. |
| TGetListInput | input | The input. |
Returns
| Type | Description |
|---|---|
| IQueryable<TEntity> |
CheckGetListPolicyAsync()
Declaration
protected virtual Task CheckGetListPolicyAsync()
Returns
| Type | Description |
|---|---|
| Task |
CheckGetPolicyAsync()
Declaration
protected virtual Task CheckGetPolicyAsync()
Returns
| Type | Description |
|---|---|
| Task |
CreateFilteredQuery(TGetListInput)
This method should create
Declaration
protected virtual IQueryable<TEntity> CreateFilteredQuery(TGetListInput input)
Parameters
| Type | Name | Description |
|---|---|---|
| TGetListInput | input | The input. |
Returns
| Type | Description |
|---|---|
| IQueryable<TEntity> |
GetAsync(TKey)
Declaration
public virtual Task<TGetOutputDto> GetAsync(TKey id)
Parameters
| Type | Name | Description |
|---|---|---|
| TKey | id |
Returns
| Type | Description |
|---|---|
| Task<TGetOutputDto> |
GetEntityByIdAsync(TKey)
Declaration
protected abstract Task<TEntity> GetEntityByIdAsync(TKey id)
Parameters
| Type | Name | Description |
|---|---|---|
| TKey | id |
Returns
| Type | Description |
|---|---|
| Task<TEntity> |
GetListAsync(TGetListInput)
Declaration
public virtual Task<PagedResultDto<TGetListOutputDto>> GetListAsync(TGetListInput input)
Parameters
| Type | Name | Description |
|---|---|---|
| TGetListInput | input |
Returns
| Type | Description |
|---|---|
| Task<PagedResultDto<TGetListOutputDto>> |
MapToGetListOutputDto(TEntity)
Maps
Declaration
protected virtual TGetListOutputDto MapToGetListOutputDto(TEntity entity)
Parameters
| Type | Name | Description |
|---|---|---|
| TEntity | entity |
Returns
| Type | Description |
|---|---|
| TGetListOutputDto |
MapToGetOutputDto(TEntity)
Maps
Declaration
protected virtual TGetOutputDto MapToGetOutputDto(TEntity entity)
Parameters
| Type | Name | Description |
|---|---|---|
| TEntity | entity |
Returns
| Type | Description |
|---|---|
| TGetOutputDto |
Implements
IAvoidDuplicateCrossCuttingConcerns
IUnitOfWorkEnabled
IAuditingEnabled
ITransientDependency
IRemoteService