Class AbstractKeyCrudAppService<TEntity, TGetOutputDto, TGetListOutputDto, TKey, TGetListInput, TCreateInput, TUpdateInput>
Inheritance
System.Object
AbstractKeyCrudAppService<TEntity, TGetOutputDto, TGetListOutputDto, TKey, TGetListInput, TCreateInput, TUpdateInput>
Implements
IAvoidDuplicateCrossCuttingConcerns
IUnitOfWorkEnabled
IAuditingEnabled
ITransientDependency
ICrudAppService<TGetOutputDto, TGetListOutputDto, TKey, TGetListInput, TCreateInput, TUpdateInput>
IRemoteService
Assembly: Volo.Abp.Ddd.Application.dll
Syntax
public abstract class AbstractKeyCrudAppService<TEntity, TGetOutputDto, TGetListOutputDto, TKey, TGetListInput, TCreateInput, TUpdateInput> : AbstractKeyReadOnlyAppService<TEntity, TGetOutputDto, TGetListOutputDto, TKey, TGetListInput>, IAvoidDuplicateCrossCuttingConcerns, IValidationEnabled, IUnitOfWorkEnabled, IAuditingEnabled, ITransientDependency, ICrudAppService<TGetOutputDto, TGetListOutputDto, TKey, TGetListInput, TCreateInput, TUpdateInput>, IReadOnlyAppService<TGetOutputDto, TGetListOutputDto, TKey, TGetListInput>, ICreateUpdateAppService<TGetOutputDto, TKey, TCreateInput, TUpdateInput>, ICreateAppService<TGetOutputDto, TCreateInput>, IUpdateAppService<TGetOutputDto, TKey, TUpdateInput>, IDeleteAppService<TKey>, IApplicationService, IRemoteService where TEntity : class, IEntity
Type Parameters
Name |
Description |
TEntity |
|
TGetOutputDto |
|
TGetListOutputDto |
|
TKey |
|
TGetListInput |
|
TCreateInput |
|
TUpdateInput |
|
Constructors
AbstractKeyCrudAppService(IRepository<TEntity>)
Declaration
protected AbstractKeyCrudAppService(IRepository<TEntity> repository)
Parameters
Properties
CreatePolicyName
Declaration
protected virtual string CreatePolicyName { get; set; }
Property Value
Type |
Description |
System.String |
|
DeletePolicyName
Declaration
protected virtual string DeletePolicyName { get; set; }
Property Value
Type |
Description |
System.String |
|
Repository
Declaration
protected IRepository<TEntity> Repository { get; }
Property Value
UpdatePolicyName
Declaration
protected virtual string UpdatePolicyName { get; set; }
Property Value
Type |
Description |
System.String |
|
Methods
CheckCreatePolicyAsync()
Declaration
protected virtual Task CheckCreatePolicyAsync()
Returns
CheckDeletePolicyAsync()
Declaration
protected virtual Task CheckDeletePolicyAsync()
Returns
CheckUpdatePolicyAsync()
Declaration
protected virtual Task CheckUpdatePolicyAsync()
Returns
CreateAsync(TCreateInput)
Declaration
public virtual Task<TGetOutputDto> CreateAsync(TCreateInput input)
Parameters
Type |
Name |
Description |
TCreateInput |
input |
|
Returns
Type |
Description |
Task<TGetOutputDto> |
|
DeleteAsync(TKey)
Declaration
public virtual Task DeleteAsync(TKey id)
Parameters
Type |
Name |
Description |
TKey |
id |
|
Returns
DeleteByIdAsync(TKey)
Declaration
protected abstract Task DeleteByIdAsync(TKey id)
Parameters
Type |
Name |
Description |
TKey |
id |
|
Returns
HasTenantIdProperty(TEntity)
Declaration
protected virtual bool HasTenantIdProperty(TEntity entity)
Parameters
Type |
Name |
Description |
TEntity |
entity |
|
Returns
Type |
Description |
System.Boolean |
|
MapToEntity(TCreateInput)
Maps to to create a new entity.
It uses IObjectMapper by default.
It can be overriden for custom mapping.
Declaration
protected virtual TEntity MapToEntity(TCreateInput createInput)
Parameters
Type |
Name |
Description |
TCreateInput |
createInput |
|
Returns
MapToEntity(TUpdateInput, TEntity)
Maps to to update the entity.
It uses IObjectMapper by default.
It can be overriden for custom mapping.
Declaration
protected virtual void MapToEntity(TUpdateInput updateInput, TEntity entity)
Parameters
Type |
Name |
Description |
TUpdateInput |
updateInput |
|
TEntity |
entity |
|
MapToEntityAsync(TCreateInput)
Declaration
protected virtual Task<TEntity> MapToEntityAsync(TCreateInput createInput)
Parameters
Type |
Name |
Description |
TCreateInput |
createInput |
|
Returns
Type |
Description |
Task<TEntity> |
|
MapToEntityAsync(TUpdateInput, TEntity)
Declaration
protected virtual Task MapToEntityAsync(TUpdateInput updateInput, TEntity entity)
Parameters
Type |
Name |
Description |
TUpdateInput |
updateInput |
|
TEntity |
entity |
|
Returns
SetIdForGuids(TEntity)
Sets Id value for the entity if is .
It's used while creating a new entity.
Declaration
protected virtual void SetIdForGuids(TEntity entity)
Parameters
Type |
Name |
Description |
TEntity |
entity |
|
TryToSetTenantId(TEntity)
Declaration
protected virtual void TryToSetTenantId(TEntity entity)
Parameters
Type |
Name |
Description |
TEntity |
entity |
|
UpdateAsync(TKey, TUpdateInput)
Declaration
public virtual Task<TGetOutputDto> UpdateAsync(TKey id, TUpdateInput input)
Parameters
Type |
Name |
Description |
TKey |
id |
|
TUpdateInput |
input |
|
Returns
Type |
Description |
Task<TGetOutputDto> |
|
Implements
IAvoidDuplicateCrossCuttingConcerns
IUnitOfWorkEnabled
IAuditingEnabled
ITransientDependency
IRemoteService
Extension Methods