Browse Source

Splitted `ICrudAppService` interface

pull/4346/head
Necati Meral 6 years ago
parent
commit
a4dda7a9fc
  1. 19
      framework/src/Volo.Abp.Ddd.Application.Contracts/Volo/Abp/Application/Services/ICreateAppService.cs
  2. 26
      framework/src/Volo.Abp.Ddd.Application.Contracts/Volo/Abp/Application/Services/ICreateUpdateAppService.cs
  3. 14
      framework/src/Volo.Abp.Ddd.Application.Contracts/Volo/Abp/Application/Services/ICrudAppService.cs
  4. 12
      framework/src/Volo.Abp.Ddd.Application.Contracts/Volo/Abp/Application/Services/IDeleteAppService.cs
  5. 28
      framework/src/Volo.Abp.Ddd.Application.Contracts/Volo/Abp/Application/Services/IReadOnlyAppService.cs
  6. 19
      framework/src/Volo.Abp.Ddd.Application.Contracts/Volo/Abp/Application/Services/IUpdateAppService.cs

19
framework/src/Volo.Abp.Ddd.Application.Contracts/Volo/Abp/Application/Services/ICreateAppService.cs

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
namespace Volo.Abp.Application.Services
{
public interface ICreateAppService<TEntityDto>
: ICreateAppService<TEntityDto, TEntityDto>
{
}
public interface ICreateAppService<TGetOutputDto, in TCreateInput>
: IApplicationService
{
Task<TGetOutputDto> CreateAsync(TCreateInput input);
}
}

26
framework/src/Volo.Abp.Ddd.Application.Contracts/Volo/Abp/Application/Services/ICreateUpdateAppService.cs

@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Volo.Abp.Application.Services
{
public interface ICreateUpdateAppService<TEntityDto, in TKey>
: ICreateUpdateAppService<TEntityDto, TKey, TEntityDto, TEntityDto>
{
}
public interface ICreateUpdateAppService<TEntityDto, in TKey, in TCreateUpdateInput>
: ICreateUpdateAppService<TEntityDto, TKey, TCreateUpdateInput, TCreateUpdateInput>
{
}
public interface ICreateUpdateAppService<TGetOutputDto, in TKey, in TCreateUpdateInput, in TUpdateInput>
: ICreateAppService<TGetOutputDto, TCreateUpdateInput>
, IUpdateAppService<TGetOutputDto, TKey, TUpdateInput>
, IApplicationService
{
}
}

14
framework/src/Volo.Abp.Ddd.Application.Contracts/Volo/Abp/Application/Services/ICrudAppService.cs

@ -1,4 +1,5 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
namespace Volo.Abp.Application.Services namespace Volo.Abp.Application.Services
@ -28,16 +29,11 @@ namespace Volo.Abp.Application.Services
} }
public interface ICrudAppService<TGetOutputDto, TGetListOutputDto, in TKey, in TGetListInput, in TCreateInput, in TUpdateInput> public interface ICrudAppService<TGetOutputDto, TGetListOutputDto, in TKey, in TGetListInput, in TCreateInput, in TUpdateInput>
: IApplicationService : IReadOnlyAppService<TGetOutputDto, TGetListOutputDto, TKey, TGetListInput>
, ICreateUpdateAppService<TGetOutputDto, TKey, TCreateInput, TUpdateInput>
, IDeleteAppService<TKey>
, IApplicationService
{ {
Task<TGetOutputDto> GetAsync(TKey id);
Task<PagedResultDto<TGetListOutputDto>> GetListAsync(TGetListInput input);
Task<TGetOutputDto> CreateAsync(TCreateInput input);
Task<TGetOutputDto> UpdateAsync(TKey id, TUpdateInput input);
Task DeleteAsync(TKey id);
} }
} }

12
framework/src/Volo.Abp.Ddd.Application.Contracts/Volo/Abp/Application/Services/IDeleteAppService.cs

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
namespace Volo.Abp.Application.Services
{
public interface IDeleteAppService<in TKey> : IApplicationService
{
Task DeleteAsync(TKey id);
}
}

28
framework/src/Volo.Abp.Ddd.Application.Contracts/Volo/Abp/Application/Services/IReadOnlyAppService.cs

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
namespace Volo.Abp.Application.Services
{
public interface IReadOnlyAppService<TEntityDto, in TKey>
: IReadOnlyAppService<TEntityDto, TEntityDto, TKey, PagedAndSortedResultRequestDto>
{
}
public interface IReadOnlyAppService<TEntityDto, in TKey, in TGetListInput>
: IReadOnlyAppService<TEntityDto, TEntityDto, TKey, TGetListInput>
{
}
public interface IReadOnlyAppService<TGetOutputDto, TGetListOutputDto, in TKey, in TGetListInput>
{
Task<TGetOutputDto> GetAsync(TKey id);
Task<PagedResultDto<TGetListOutputDto>> GetListAsync(TGetListInput input);
}
}

19
framework/src/Volo.Abp.Ddd.Application.Contracts/Volo/Abp/Application/Services/IUpdateAppService.cs

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
namespace Volo.Abp.Application.Services
{
public interface IUpdateAppService<TEntityDto, in TKey>
: IUpdateAppService<TEntityDto, TKey, TEntityDto>
{
}
public interface IUpdateAppService<TGetOutputDto, in TKey, in TUpdateInput>
: IApplicationService
{
Task<TGetOutputDto> UpdateAsync(TKey id, TUpdateInput input);
}
}
Loading…
Cancel
Save