diff --git a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/ApplicationService.cs b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/ApplicationService.cs index 47693be751..24a824c7a1 100644 --- a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/ApplicationService.cs +++ b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/ApplicationService.cs @@ -6,16 +6,27 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; using Volo.Abp.Aspects; +using Volo.Abp.Auditing; +using Volo.Abp.Authorization; +using Volo.Abp.DependencyInjection; using Volo.Abp.Guids; using Volo.Abp.MultiTenancy; using Volo.Abp.ObjectMapping; using Volo.Abp.Timing; using Volo.Abp.Uow; using Volo.Abp.Users; +using Volo.Abp.Validation; namespace Volo.Abp.Application.Services { - public abstract class ApplicationService : IApplicationService, IAvoidDuplicateCrossCuttingConcerns + public abstract class ApplicationService : + IApplicationService, + IAvoidDuplicateCrossCuttingConcerns, + IValidationEnabled, + IUnitOfWorkEnabled, + IAuthorizationEnabled, + IAuditingEnabled, + ITransientDependency { public static string[] CommonPostfixes { get; set; } = { "AppService", "ApplicationService", "Service" }; diff --git a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/IApplicationService.cs b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/IApplicationService.cs index 6bf851d693..c76414a298 100644 --- a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/IApplicationService.cs +++ b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/IApplicationService.cs @@ -1,21 +1,10 @@ -using Volo.Abp.Auditing; -using Volo.Abp.Authorization; -using Volo.Abp.DependencyInjection; -using Volo.Abp.Uow; -using Volo.Abp.Validation; - -namespace Volo.Abp.Application.Services +namespace Volo.Abp.Application.Services { /// /// This interface must be implemented by all application services to register and identify them by convention. /// public interface IApplicationService : - ITransientDependency, - IRemoteService, - IUnitOfWorkEnabled, - IValidationEnabled, - IAuthorizationEnabled, - IAuditingEnabled + IRemoteService { } diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/BasicRepositoryBase.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/BasicRepositoryBase.cs index ad91a5367b..05fc760182 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/BasicRepositoryBase.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/BasicRepositoryBase.cs @@ -5,10 +5,15 @@ using System.Threading.Tasks; using Volo.Abp.DependencyInjection; using Volo.Abp.Domain.Entities; using Volo.Abp.Threading; +using Volo.Abp.Uow; namespace Volo.Abp.Domain.Repositories { - public abstract class BasicRepositoryBase : IBasicRepository, IServiceProviderAccessor + public abstract class BasicRepositoryBase : + IBasicRepository, + IServiceProviderAccessor, + IUnitOfWorkEnabled, + ITransientDependency where TEntity : class, IEntity { public IServiceProvider ServiceProvider { get; set; } diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/IRepository.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/IRepository.cs index a64d7fa2e0..a77dc4acb7 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/IRepository.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/IRepository.cs @@ -3,16 +3,14 @@ using System.Linq.Expressions; using System.Threading; using System.Threading.Tasks; using JetBrains.Annotations; -using Volo.Abp.DependencyInjection; using Volo.Abp.Domain.Entities; -using Volo.Abp.Uow; namespace Volo.Abp.Domain.Repositories { /// /// Just to mark a class as repository. /// - public interface IRepository : IUnitOfWorkEnabled, ITransientDependency + public interface IRepository { } diff --git a/modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/IdentityRoleController.cs b/modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/IdentityRoleController.cs index cae2b321d4..8164269d6c 100644 --- a/modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/IdentityRoleController.cs +++ b/modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/IdentityRoleController.cs @@ -3,17 +3,15 @@ using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Volo.Abp.Application.Dtos; -using Volo.Abp.Application.Services; -using Volo.Abp.DependencyInjection; +using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.PermissionManagement; namespace Volo.Abp.Identity { [RemoteService] [Area("identity")] - [Controller] [ControllerName("Role")] - public class IdentityRoleController : IIdentityRoleAppService, ITransientDependency + public class IdentityRoleController : AbpController, IIdentityRoleAppService { private readonly IIdentityRoleAppService _roleAppService; diff --git a/modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/IdentityUserController.cs b/modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/IdentityUserController.cs index 795ba7a1b3..e5618710cb 100644 --- a/modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/IdentityUserController.cs +++ b/modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/IdentityUserController.cs @@ -2,17 +2,15 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Volo.Abp.Application.Dtos; -using Volo.Abp.Application.Services; -using Volo.Abp.DependencyInjection; +using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.PermissionManagement; namespace Volo.Abp.Identity { [RemoteService] [Area("identity")] - [Controller] [ControllerName("User")] - public class IdentityUserController : IIdentityUserAppService, ITransientDependency //TODO: Try to implement these type wrapper controllers automatically! + public class IdentityUserController : AbpController, IIdentityUserAppService { private readonly IIdentityUserAppService _userAppService;