IAsyncCrudAppService.cs 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. using System.Threading.Tasks;
  2. using Abp.Application.Services.Dto;
  3. namespace Abp.Application.Services
  4. {
  5. public interface IAsyncCrudAppService<TEntityDto>
  6. : IAsyncCrudAppService<TEntityDto, int>
  7. where TEntityDto : IEntityDto<int>
  8. {
  9. }
  10. public interface IAsyncCrudAppService<TEntityDto, TPrimaryKey>
  11. : IAsyncCrudAppService<TEntityDto, TPrimaryKey, PagedAndSortedResultRequestDto>
  12. where TEntityDto : IEntityDto<TPrimaryKey>
  13. {
  14. }
  15. public interface IAsyncCrudAppService<TEntityDto, TPrimaryKey, in TGetAllInput>
  16. : IAsyncCrudAppService<TEntityDto, TPrimaryKey, TGetAllInput, TEntityDto, TEntityDto>
  17. where TEntityDto : IEntityDto<TPrimaryKey>
  18. {
  19. }
  20. public interface IAsyncCrudAppService<TEntityDto, TPrimaryKey, in TGetAllInput, in TCreateInput>
  21. : IAsyncCrudAppService<TEntityDto, TPrimaryKey, TGetAllInput, TCreateInput, TCreateInput>
  22. where TEntityDto : IEntityDto<TPrimaryKey>
  23. where TCreateInput : IEntityDto<TPrimaryKey>
  24. {
  25. }
  26. public interface IAsyncCrudAppService<TEntityDto, TPrimaryKey, in TGetAllInput, in TCreateInput, in TUpdateInput>
  27. : IAsyncCrudAppService<TEntityDto, TPrimaryKey, TGetAllInput, TCreateInput, TUpdateInput, EntityDto<TPrimaryKey>>
  28. where TEntityDto : IEntityDto<TPrimaryKey>
  29. where TUpdateInput : IEntityDto<TPrimaryKey>
  30. {
  31. }
  32. public interface IAsyncCrudAppService<TEntityDto, TPrimaryKey, in TGetAllInput, in TCreateInput, in TUpdateInput, in TGetInput>
  33. : IAsyncCrudAppService<TEntityDto, TPrimaryKey, TGetAllInput, TCreateInput, TUpdateInput, TGetInput, EntityDto<TPrimaryKey>>
  34. where TEntityDto : IEntityDto<TPrimaryKey>
  35. where TUpdateInput : IEntityDto<TPrimaryKey>
  36. where TGetInput : IEntityDto<TPrimaryKey>
  37. {
  38. }
  39. public interface IAsyncCrudAppService<TEntityDto, TPrimaryKey, in TGetAllInput, in TCreateInput, in TUpdateInput, in TGetInput, in TDeleteInput>
  40. : IApplicationService
  41. where TEntityDto : IEntityDto<TPrimaryKey>
  42. where TUpdateInput : IEntityDto<TPrimaryKey>
  43. where TGetInput : IEntityDto<TPrimaryKey>
  44. where TDeleteInput : IEntityDto<TPrimaryKey>
  45. {
  46. Task<TEntityDto> Get(TGetInput input);
  47. Task<PagedResultDto<TEntityDto>> GetAll(TGetAllInput input);
  48. Task<TEntityDto> Create(TCreateInput input);
  49. Task<TEntityDto> Update(TUpdateInput input);
  50. Task Delete(TDeleteInput input);
  51. }
  52. }