diff --git a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/AbstractKeyCrudAppService.cs b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/AbstractKeyCrudAppService.cs index e79f0ce75f..ce44a22455 100644 --- a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/AbstractKeyCrudAppService.cs +++ b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/AbstractKeyCrudAppService.cs @@ -62,6 +62,8 @@ namespace Volo.Abp.Application.Services ICrudAppService where TEntity : class, IEntity { + protected new IRepository Repository { get; } + protected virtual string CreatePolicyName { get; set; } protected virtual string UpdatePolicyName { get; set; } @@ -71,7 +73,7 @@ namespace Volo.Abp.Application.Services protected AbstractKeyCrudAppService(IRepository repository) : base(repository) { - + Repository = repository; } public virtual async Task CreateAsync(TCreateInput input) diff --git a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/AbstractKeyReadOnlyAppService.cs b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/AbstractKeyReadOnlyAppService.cs index e6af5484a7..45dff23852 100644 --- a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/AbstractKeyReadOnlyAppService.cs +++ b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/AbstractKeyReadOnlyAppService.cs @@ -13,7 +13,7 @@ namespace Volo.Abp.Application.Services : AbstractKeyReadOnlyAppService where TEntity : class, IEntity { - protected AbstractKeyReadOnlyAppService(IRepository repository) + protected AbstractKeyReadOnlyAppService(IReadOnlyRepository repository) : base(repository) { @@ -24,7 +24,7 @@ namespace Volo.Abp.Application.Services : AbstractKeyReadOnlyAppService where TEntity : class, IEntity { - protected AbstractKeyReadOnlyAppService(IRepository repository) + protected AbstractKeyReadOnlyAppService(IReadOnlyRepository repository) : base(repository) { @@ -36,13 +36,13 @@ namespace Volo.Abp.Application.Services , IReadOnlyAppService where TEntity : class, IEntity { - protected IRepository Repository { get; } + protected IReadOnlyRepository Repository { get; } protected virtual string GetPolicyName { get; set; } protected virtual string GetListPolicyName { get; set; } - protected AbstractKeyReadOnlyAppService(IRepository repository) + protected AbstractKeyReadOnlyAppService(IReadOnlyRepository repository) { Repository = repository; } diff --git a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/ReadOnlyAppService.cs b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/ReadOnlyAppService.cs index 0ddc4b4700..d99928126c 100644 --- a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/ReadOnlyAppService.cs +++ b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/ReadOnlyAppService.cs @@ -13,7 +13,7 @@ namespace Volo.Abp.Application.Services where TEntity : class, IEntity where TEntityDto : IEntityDto { - protected ReadOnlyAppService(IRepository repository) + protected ReadOnlyAppService(IReadOnlyRepository repository) : base(repository) { @@ -25,7 +25,7 @@ namespace Volo.Abp.Application.Services where TEntity : class, IEntity where TEntityDto : IEntityDto { - protected ReadOnlyAppService(IRepository repository) + protected ReadOnlyAppService(IReadOnlyRepository repository) : base(repository) { @@ -38,9 +38,9 @@ namespace Volo.Abp.Application.Services where TGetOutputDto : IEntityDto where TGetListOutputDto : IEntityDto { - protected new IRepository Repository { get; } + protected new IReadOnlyRepository Repository { get; } - protected ReadOnlyAppService(IRepository repository) + protected ReadOnlyAppService(IReadOnlyRepository repository) : base(repository) { Repository = repository;