diff --git a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/AsyncCrudAppService.cs b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/AsyncCrudAppService.cs deleted file mode 100644 index 055de921ee..0000000000 --- a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/AsyncCrudAppService.cs +++ /dev/null @@ -1,168 +0,0 @@ -using System.Linq; -using System.Threading.Tasks; -using Volo.Abp.Application.Dtos; -using Volo.Abp.Domain.Entities; -using Volo.Abp.Domain.Repositories; -using Volo.Abp.Linq; -using Volo.Abp.MultiTenancy; - -namespace Volo.Abp.Application.Services -{ - public abstract class AsyncCrudAppService - : AsyncCrudAppService - where TEntity : class, IEntity - where TEntityDto : IEntityDto - { - protected AsyncCrudAppService(IRepository repository) - : base(repository) - { - - } - } - - public abstract class AsyncCrudAppService - : AsyncCrudAppService - where TEntity : class, IEntity - where TEntityDto : IEntityDto - { - protected AsyncCrudAppService(IRepository repository) - : base(repository) - { - - } - } - - public abstract class AsyncCrudAppService - : AsyncCrudAppService - where TEntity : class, IEntity - where TEntityDto : IEntityDto - { - protected AsyncCrudAppService(IRepository repository) - : base(repository) - { - - } - } - - public abstract class AsyncCrudAppService - : AsyncCrudAppService - where TEntity : class, IEntity - where TEntityDto : IEntityDto - { - protected AsyncCrudAppService(IRepository repository) - : base(repository) - { - - } - - protected override TEntityDto MapToGetListOutputDto(TEntity entity) - { - return MapToGetOutputDto(entity); - } - } - - public abstract class AsyncCrudAppService - : CrudAppServiceBase, - IAsyncCrudAppService - where TEntity : class, IEntity - where TGetOutputDto : IEntityDto - where TGetListOutputDto : IEntityDto - { - public IAsyncQueryableExecuter AsyncQueryableExecuter { get; set; } - - protected AsyncCrudAppService(IRepository repository) - : base(repository) - { - AsyncQueryableExecuter = DefaultAsyncQueryableExecuter.Instance; - } - - public virtual async Task GetAsync(TKey id) - { - await CheckGetPolicyAsync(); - - var entity = await GetEntityByIdAsync(id); - return MapToGetOutputDto(entity); - } - - public virtual async Task> GetListAsync(TGetListInput input) - { - await CheckGetListPolicyAsync(); - - var query = CreateFilteredQuery(input); - - var totalCount = await AsyncQueryableExecuter.CountAsync(query); - - query = ApplySorting(query, input); - query = ApplyPaging(query, input); - - var entities = await AsyncQueryableExecuter.ToListAsync(query); - - return new PagedResultDto( - totalCount, - entities.Select(MapToGetListOutputDto).ToList() - ); - } - - public virtual async Task CreateAsync(TCreateInput input) - { - await CheckCreatePolicyAsync(); - - var entity = MapToEntity(input); - - TryToSetTenantId(entity); - - await Repository.InsertAsync(entity, autoSave: true); - - return MapToGetOutputDto(entity); - } - - public virtual async Task UpdateAsync(TKey id, TUpdateInput input) - { - await CheckUpdatePolicyAsync(); - - var entity = await GetEntityByIdAsync(id); - //TODO: Check if input has id different than given id and normalize if it's default value, throw ex otherwise - MapToEntity(input, entity); - await Repository.UpdateAsync(entity, autoSave: true); - - return MapToGetOutputDto(entity); - } - - public virtual async Task DeleteAsync(TKey id) - { - await CheckDeletePolicyAsync(); - - await Repository.DeleteAsync(id); - } - - protected virtual Task GetEntityByIdAsync(TKey id) - { - return Repository.GetAsync(id); - } - - protected virtual async Task CheckGetPolicyAsync() - { - await CheckPolicyAsync(GetPolicyName); - } - - protected virtual async Task CheckGetListPolicyAsync() - { - await CheckPolicyAsync(GetListPolicyName); - } - - protected virtual async Task CheckCreatePolicyAsync() - { - await CheckPolicyAsync(CreatePolicyName); - } - - protected virtual async Task CheckUpdatePolicyAsync() - { - await CheckPolicyAsync(UpdatePolicyName); - } - - protected virtual async Task CheckDeletePolicyAsync() - { - await CheckPolicyAsync(DeletePolicyName); - } - } -} diff --git a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/CrudAppService.cs b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/CrudAppService.cs index e11df56056..3a64760a0f 100644 --- a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/CrudAppService.cs +++ b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/CrudAppService.cs @@ -1,8 +1,13 @@ -using System.Linq; +using System; +using System.Linq; +using System.Linq.Dynamic.Core; +using System.Threading.Tasks; using Volo.Abp.Application.Dtos; using Volo.Abp.Domain.Entities; using Volo.Abp.Domain.Repositories; +using Volo.Abp.Linq; using Volo.Abp.MultiTenancy; +using Volo.Abp.ObjectMapping; namespace Volo.Abp.Application.Services { @@ -34,7 +39,6 @@ namespace Volo.Abp.Application.Services : CrudAppService where TEntity : class, IEntity where TEntityDto : IEntityDto - where TCreateInput : IEntityDto { protected CrudAppService(IRepository repository) : base(repository) @@ -44,9 +48,9 @@ namespace Volo.Abp.Application.Services } public abstract class CrudAppService - : CrudAppService - where TEntity : class, IEntity - where TEntityDto : IEntityDto + : CrudAppService + where TEntity : class, IEntity + where TEntityDto : IEntityDto { protected CrudAppService(IRepository repository) : base(repository) @@ -61,38 +65,52 @@ namespace Volo.Abp.Application.Services } public abstract class CrudAppService - : CrudAppServiceBase, + : ApplicationService, ICrudAppService where TEntity : class, IEntity - where TGetOutputDto : IEntityDto - where TGetListOutputDto : IEntityDto + where TGetOutputDto : IEntityDto + where TGetListOutputDto : IEntityDto { + public IAsyncQueryableExecuter AsyncQueryableExecuter { get; set; } + + protected IRepository Repository { get; } + + protected virtual string GetPolicyName { get; set; } + + protected virtual string GetListPolicyName { get; set; } + + protected virtual string CreatePolicyName { get; set; } + + protected virtual string UpdatePolicyName { get; set; } + + protected virtual string DeletePolicyName { get; set; } + protected CrudAppService(IRepository repository) - : base(repository) { - + Repository = repository; + AsyncQueryableExecuter = DefaultAsyncQueryableExecuter.Instance; } - public virtual TGetOutputDto Get(TKey id) + public virtual async Task GetAsync(TKey id) { - CheckGetPolicy(); + await CheckGetPolicyAsync(); - var entity = GetEntityById(id); + var entity = await GetEntityByIdAsync(id); return MapToGetOutputDto(entity); } - public virtual PagedResultDto GetList(TGetListInput input) + public virtual async Task> GetListAsync(TGetListInput input) { - CheckGetListPolicy(); + await CheckGetListPolicyAsync(); var query = CreateFilteredQuery(input); - var totalCount = query.Count(); + var totalCount = await AsyncQueryableExecuter.CountAsync(query); query = ApplySorting(query, input); query = ApplyPaging(query, input); - var entities = query.ToList(); + var entities = await AsyncQueryableExecuter.ToListAsync(query); return new PagedResultDto( totalCount, @@ -100,65 +118,218 @@ namespace Volo.Abp.Application.Services ); } - public virtual TGetOutputDto Create(TCreateInput input) + public virtual async Task CreateAsync(TCreateInput input) { - CheckCreatePolicy(); + await CheckCreatePolicyAsync(); var entity = MapToEntity(input); TryToSetTenantId(entity); - Repository.Insert(entity, autoSave: true); + await Repository.InsertAsync(entity, autoSave: true); return MapToGetOutputDto(entity); } - public virtual TGetOutputDto Update(TKey id, TUpdateInput input) + public virtual async Task UpdateAsync(TKey id, TUpdateInput input) { - CheckUpdatePolicy(); + await CheckUpdatePolicyAsync(); - var entity = GetEntityById(id); + var entity = await GetEntityByIdAsync(id); + //TODO: Check if input has id different than given id and normalize if it's default value, throw ex otherwise MapToEntity(input, entity); - Repository.Update(entity, autoSave: true); + await Repository.UpdateAsync(entity, autoSave: true); return MapToGetOutputDto(entity); } - public virtual void Delete(TKey id) + public virtual async Task DeleteAsync(TKey id) { - CheckDeletePolicy(); + await CheckDeletePolicyAsync(); - Repository.Delete(id); + await Repository.DeleteAsync(id); } - protected virtual TEntity GetEntityById(TKey id) + protected virtual Task GetEntityByIdAsync(TKey id) { - return Repository.Get(id); + return Repository.GetAsync(id); } - protected virtual void CheckGetPolicy() + protected virtual async Task CheckGetPolicyAsync() { - CheckPolicy(GetPolicyName); + await CheckPolicyAsync(GetPolicyName); } - protected virtual void CheckGetListPolicy() + protected virtual async Task CheckGetListPolicyAsync() { - CheckPolicy(GetListPolicyName); + await CheckPolicyAsync(GetListPolicyName); } - protected virtual void CheckCreatePolicy() + protected virtual async Task CheckCreatePolicyAsync() { - CheckPolicy(CreatePolicyName); + await CheckPolicyAsync(CreatePolicyName); + } + + protected virtual async Task CheckUpdatePolicyAsync() + { + await CheckPolicyAsync(UpdatePolicyName); + } + + protected virtual async Task CheckDeletePolicyAsync() + { + await CheckPolicyAsync(DeletePolicyName); + } + + /// + /// Should apply sorting if needed. + /// + /// The query. + /// The input. + protected virtual IQueryable ApplySorting(IQueryable query, TGetListInput input) + { + //Try to sort query if available + var sortInput = input as ISortedResultRequest; + if (sortInput != null) + { + if (!sortInput.Sorting.IsNullOrWhiteSpace()) + { + return query.OrderBy(sortInput.Sorting); + } + } + + //IQueryable.Task requires sorting, so we should sort if Take will be used. + if (input is ILimitedResultRequest) + { + return query.OrderByDescending(e => e.Id); + } + + //No sorting + return query; + } + + /// + /// Should apply paging if needed. + /// + /// The query. + /// The input. + protected virtual IQueryable ApplyPaging(IQueryable query, TGetListInput input) + { + //Try to use paging if available + var pagedInput = input as IPagedResultRequest; + if (pagedInput != null) + { + return query.PageBy(pagedInput); + } + + //Try to limit query result if available + var limitedInput = input as ILimitedResultRequest; + if (limitedInput != null) + { + return query.Take(limitedInput.MaxResultCount); + } + + //No paging + return query; + } + + /// + /// This method should create based on given input. + /// It should filter query if needed, but should not do sorting or paging. + /// Sorting should be done in and paging should be done in + /// methods. + /// + /// The input. + protected virtual IQueryable CreateFilteredQuery(TGetListInput input) + { + return Repository; + } + + /// + /// Maps to . + /// It uses by default. + /// It can be overriden for custom mapping. + /// + protected virtual TGetOutputDto MapToGetOutputDto(TEntity entity) + { + return ObjectMapper.Map(entity); + } + + /// + /// Maps to . + /// It uses by default. + /// It can be overriden for custom mapping. + /// + protected virtual TGetListOutputDto MapToGetListOutputDto(TEntity entity) + { + return ObjectMapper.Map(entity); + } + + /// + /// Maps to to create a new entity. + /// It uses by default. + /// It can be overriden for custom mapping. + /// + protected virtual TEntity MapToEntity(TCreateInput createInput) + { + var entity = ObjectMapper.Map(createInput); + SetIdForGuids(entity); + return entity; + } + + /// + /// Sets Id value for the entity if is . + /// It's used while creating a new entity. + /// + protected virtual void SetIdForGuids(TEntity entity) + { + var entityWithGuidId = entity as IEntity; + + if (entityWithGuidId == null || entityWithGuidId.Id != Guid.Empty) + { + return; + } + + entityWithGuidId.Id = GuidGenerator.Create(); + } + + /// + /// Maps to to update the entity. + /// It uses by default. + /// It can be overriden for custom mapping. + /// + protected virtual void MapToEntity(TUpdateInput updateInput, TEntity entity) + { + if (updateInput is IEntityDto entityDto) + { + entityDto.Id = entity.Id; + } + + ObjectMapper.Map(updateInput, entity); } - protected virtual void CheckUpdatePolicy() + protected virtual void TryToSetTenantId(TEntity entity) { - CheckPolicy(UpdatePolicyName); + if (entity is IMultiTenant && HasTenantIdProperty(entity)) + { + var tenantId = CurrentTenant.Id; + + if (!tenantId.HasValue) + { + return; + } + + var propertyInfo = entity.GetType().GetProperty(nameof(IMultiTenant.TenantId)); + + if (propertyInfo != null && propertyInfo.GetSetMethod() != null) + { + propertyInfo.SetValue(entity, tenantId, null); + } + } } - protected virtual void CheckDeletePolicy() + protected virtual bool HasTenantIdProperty(TEntity entity) { - CheckPolicy(DeletePolicyName); + return entity.GetType().GetProperty(nameof(IMultiTenant.TenantId)) != null; } } } diff --git a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/CrudAppServiceBase.cs b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/CrudAppServiceBase.cs deleted file mode 100644 index d504119a16..0000000000 --- a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/CrudAppServiceBase.cs +++ /dev/null @@ -1,191 +0,0 @@ -using System; -using System.Linq; -using System.Linq.Dynamic.Core; -using Volo.Abp.Application.Dtos; -using Volo.Abp.Domain.Entities; -using Volo.Abp.Domain.Repositories; -using Volo.Abp.MultiTenancy; -using Volo.Abp.ObjectMapping; - -namespace Volo.Abp.Application.Services -{ - /// - /// This is a common base class for CrudAppService and AsyncCrudAppService classes. - /// Inherit either from CrudAppService or AsyncCrudAppService, not from this class. - /// - public abstract class CrudAppServiceBase : - ApplicationService - where TEntity : class, IEntity - where TGetOutputDto : IEntityDto - where TGetListOutputDto : IEntityDto - { - protected IRepository Repository { get; } - - protected virtual string GetPolicyName { get; set; } - - protected virtual string GetListPolicyName { get; set; } - - protected virtual string CreatePolicyName { get; set; } - - protected virtual string UpdatePolicyName { get; set; } - - protected virtual string DeletePolicyName { get; set; } - - protected CrudAppServiceBase(IRepository repository) - { - Repository = repository; - } - - /// - /// Should apply sorting if needed. - /// - /// The query. - /// The input. - protected virtual IQueryable ApplySorting(IQueryable query, TGetListInput input) - { - //Try to sort query if available - var sortInput = input as ISortedResultRequest; - if (sortInput != null) - { - if (!sortInput.Sorting.IsNullOrWhiteSpace()) - { - return query.OrderBy(sortInput.Sorting); - } - } - - //IQueryable.Task requires sorting, so we should sort if Take will be used. - if (input is ILimitedResultRequest) - { - return query.OrderByDescending(e => e.Id); - } - - //No sorting - return query; - } - - /// - /// Should apply paging if needed. - /// - /// The query. - /// The input. - protected virtual IQueryable ApplyPaging(IQueryable query, TGetListInput input) - { - //Try to use paging if available - var pagedInput = input as IPagedResultRequest; - if (pagedInput != null) - { - return query.PageBy(pagedInput); - } - - //Try to limit query result if available - var limitedInput = input as ILimitedResultRequest; - if (limitedInput != null) - { - return query.Take(limitedInput.MaxResultCount); - } - - //No paging - return query; - } - - /// - /// This method should create based on given input. - /// It should filter query if needed, but should not do sorting or paging. - /// Sorting should be done in and paging should be done in - /// methods. - /// - /// The input. - protected virtual IQueryable CreateFilteredQuery(TGetListInput input) - { - return Repository; - } - - /// - /// Maps to . - /// It uses by default. - /// It can be overriden for custom mapping. - /// - protected virtual TGetOutputDto MapToGetOutputDto(TEntity entity) - { - return ObjectMapper.Map(entity); - } - - /// - /// Maps to . - /// It uses by default. - /// It can be overriden for custom mapping. - /// - protected virtual TGetListOutputDto MapToGetListOutputDto(TEntity entity) - { - return ObjectMapper.Map(entity); - } - - /// - /// Maps to to create a new entity. - /// It uses by default. - /// It can be overriden for custom mapping. - /// - protected virtual TEntity MapToEntity(TCreateInput createInput) - { - var entity = ObjectMapper.Map(createInput); - SetIdForGuids(entity); - return entity; - } - - /// - /// Sets Id value for the entity if is . - /// It's used while creating a new entity. - /// - protected virtual void SetIdForGuids(TEntity entity) - { - var entityWithGuidId = entity as IEntity; - - if (entityWithGuidId == null || entityWithGuidId.Id != Guid.Empty) - { - return; - } - - entityWithGuidId.Id = GuidGenerator.Create(); - } - - /// - /// Maps to to update the entity. - /// It uses by default. - /// It can be overriden for custom mapping. - /// - protected virtual void MapToEntity(TUpdateInput updateInput, TEntity entity) - { - if (updateInput is IEntityDto entityDto) - { - entityDto.Id = entity.Id; - } - - ObjectMapper.Map(updateInput, entity); - } - - protected virtual void TryToSetTenantId(TEntity entity) - { - if (entity is IMultiTenant && HasTenantIdProperty(entity)) - { - var tenantId = CurrentTenant.Id; - - if (!tenantId.HasValue) - { - return; - } - - var propertyInfo = entity.GetType().GetProperty(nameof(IMultiTenant.TenantId)); - - if (propertyInfo != null && propertyInfo.GetSetMethod() != null) - { - propertyInfo.SetValue(entity, tenantId, null); - } - } - } - - protected virtual bool HasTenantIdProperty(TEntity entity) - { - return entity.GetType().GetProperty(nameof(IMultiTenant.TenantId)) != null; - } - } -} diff --git a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/IAsyncCrudAppService.cs b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/IAsyncCrudAppService.cs deleted file mode 100644 index 8f07cb2412..0000000000 --- a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/IAsyncCrudAppService.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System.Threading.Tasks; -using Volo.Abp.Application.Dtos; - -namespace Volo.Abp.Application.Services -{ - public interface IAsyncCrudAppService - : IAsyncCrudAppService - where TEntityDto : IEntityDto - { - - } - - public interface IAsyncCrudAppService - : IAsyncCrudAppService - where TEntityDto : IEntityDto - { - - } - - public interface IAsyncCrudAppService - : IAsyncCrudAppService - where TEntityDto : IEntityDto - { - - } - - public interface IAsyncCrudAppService - : IAsyncCrudAppService - where TEntityDto : IEntityDto - { - - } - - public interface IAsyncCrudAppService - : IApplicationService - where TGetOutputDto : IEntityDto - where TGetListOutputDto : IEntityDto - { - Task GetAsync(TKey id); - - Task> GetListAsync(TGetListInput input); - - Task CreateAsync(TCreateInput input); - - Task UpdateAsync(TKey id, TUpdateInput input); - - Task DeleteAsync(TKey id); - } -} diff --git a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/ICrudAppService.cs b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/ICrudAppService.cs index 2f3b770849..7816bd20eb 100644 --- a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/ICrudAppService.cs +++ b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/ICrudAppService.cs @@ -1,3 +1,4 @@ +using System.Threading.Tasks; using Volo.Abp.Application.Dtos; namespace Volo.Abp.Application.Services @@ -24,7 +25,7 @@ namespace Volo.Abp.Application.Services } public interface ICrudAppService - : ICrudAppService + : ICrudAppService where TEntityDto : IEntityDto { @@ -35,14 +36,14 @@ namespace Volo.Abp.Application.Services where TGetOutputDto : IEntityDto where TGetListOutputDto : IEntityDto { - TGetOutputDto Get(TKey id); + Task GetAsync(TKey id); - PagedResultDto GetList(TGetListInput input); + Task> GetListAsync(TGetListInput input); - TGetOutputDto Create(TCreateInput input); + Task CreateAsync(TCreateInput input); - TGetOutputDto Update(TKey id, TUpdateInput input); + Task UpdateAsync(TKey id, TUpdateInput input); - void Delete(TKey id); + Task DeleteAsync(TKey id); } } diff --git a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Application/IPeopleAppService.cs b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Application/IPeopleAppService.cs index 6317d7d8ce..cf2393869d 100644 --- a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Application/IPeopleAppService.cs +++ b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Application/IPeopleAppService.cs @@ -6,7 +6,7 @@ using Volo.Abp.TestApp.Application.Dto; namespace Volo.Abp.TestApp.Application { - public interface IPeopleAppService : IAsyncCrudAppService + public interface IPeopleAppService : ICrudAppService { Task> GetPhones(Guid id, GetPersonPhonesFilter filter); diff --git a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Application/PeopleAppService.cs b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Application/PeopleAppService.cs index ef76becbc5..e21cc14d08 100644 --- a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Application/PeopleAppService.cs +++ b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Application/PeopleAppService.cs @@ -10,7 +10,7 @@ using Volo.Abp.TestApp.Application.Dto; namespace Volo.Abp.TestApp.Application { - public class PeopleAppService : AsyncCrudAppService, IPeopleAppService + public class PeopleAppService : CrudAppService, IPeopleAppService { public PeopleAppService(IRepository repository) : base(repository) diff --git a/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IIdentityRoleAppService.cs b/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IIdentityRoleAppService.cs index cc72600e16..0d8f19f796 100644 --- a/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IIdentityRoleAppService.cs +++ b/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IIdentityRoleAppService.cs @@ -5,7 +5,7 @@ using Volo.Abp.Application.Services; namespace Volo.Abp.Identity { - public interface IIdentityRoleAppService : IAsyncCrudAppService + public interface IIdentityRoleAppService : ICrudAppService { //TODO: remove after a better design Task> GetAllListAsync(); diff --git a/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IIdentityUserAppService.cs b/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IIdentityUserAppService.cs index f3e342503c..a68552d653 100644 --- a/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IIdentityUserAppService.cs +++ b/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IIdentityUserAppService.cs @@ -5,7 +5,7 @@ using Volo.Abp.Application.Services; namespace Volo.Abp.Identity { - public interface IIdentityUserAppService : IAsyncCrudAppService + public interface IIdentityUserAppService : ICrudAppService { Task> GetRolesAsync(Guid id); diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/ITenantAppService.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/ITenantAppService.cs index 637134abb3..cd5f0697f7 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/ITenantAppService.cs +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/ITenantAppService.cs @@ -4,7 +4,7 @@ using Volo.Abp.Application.Services; namespace Volo.Abp.TenantManagement { - public interface ITenantAppService : IAsyncCrudAppService + public interface ITenantAppService : ICrudAppService { Task GetDefaultConnectionStringAsync(Guid id);