IIwbZeroAsyncCrudAppService.cs 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. using System.Collections.Generic;
  2. using System.Threading.Tasks;
  3. using System.Web.Mvc;
  4. using Abp.Application.Services;
  5. using Abp.Application.Services.Dto;
  6. namespace IwbZero.AppServiceBase
  7. {
  8. public interface IIwbZeroAsyncCrudAppService<TEntityDto, TPrimaryKey, in TGetAllInput, in TCreateInput, in TUpdateInput, in TGetInput, in TDeleteInput> : IApplicationService
  9. {
  10. Task<List<SelectListItem>> GetSelectList();
  11. Task<string> GetSelectStr();
  12. Task<TEntityDto> GetDto(TGetInput input);
  13. Task<TEntityDto> GetDtoById(TPrimaryKey id);
  14. Task<TEntityDto> GetDtoByNo(string no);
  15. Task<PagedResultDto<TEntityDto>> GetAll(TGetAllInput input);
  16. Task Create(TCreateInput input);
  17. Task Update(TUpdateInput input);
  18. Task Delete(TDeleteInput input);
  19. }
  20. #region AppService
  21. public interface IIwbZeroAsyncCrudAppService<TEntityDto>
  22. : IIwbZeroAsyncCrudAppService<TEntityDto, int>
  23. where TEntityDto : IEntityDto<int>
  24. {
  25. }
  26. public interface IIwbZeroAsyncCrudAppService<TEntityDto, TPrimaryKey>
  27. : IIwbZeroAsyncCrudAppService<TEntityDto, TPrimaryKey, PagedAndSortedResultRequestDto>
  28. where TEntityDto : IEntityDto<TPrimaryKey>
  29. {
  30. }
  31. public interface IIwbZeroAsyncCrudAppService<TEntityDto, TPrimaryKey, in TGetAllInput>
  32. : IIwbZeroAsyncCrudAppService<TEntityDto, TPrimaryKey, TGetAllInput, TEntityDto, TEntityDto>
  33. where TEntityDto : IEntityDto<TPrimaryKey>
  34. {
  35. }
  36. public interface IIwbZeroAsyncCrudAppService<TEntityDto, TPrimaryKey, in TGetAllInput, in TCreateInput>
  37. : IIwbZeroAsyncCrudAppService<TEntityDto, TPrimaryKey, TGetAllInput, TCreateInput, TCreateInput>
  38. where TEntityDto : IEntityDto<TPrimaryKey>
  39. where TCreateInput : IEntityDto<TPrimaryKey>
  40. {
  41. }
  42. public interface IIwbZeroAsyncCrudAppService<TEntityDto, TPrimaryKey, in TGetAllInput, in TCreateInput, in TUpdateInput>
  43. : IIwbZeroAsyncCrudAppService<TEntityDto, TPrimaryKey, TGetAllInput, TCreateInput, TUpdateInput, EntityDto<TPrimaryKey>>
  44. where TEntityDto : IEntityDto<TPrimaryKey>
  45. where TUpdateInput : IEntityDto<TPrimaryKey>
  46. {
  47. }
  48. public interface IIwbZeroAsyncCrudAppService<TEntityDto, TPrimaryKey, in TGetAllInput, in TCreateInput, in TUpdateInput, in TGetInput>
  49. : IIwbZeroAsyncCrudAppService<TEntityDto, TPrimaryKey, TGetAllInput, TCreateInput, TUpdateInput, TGetInput, EntityDto<TPrimaryKey>>
  50. where TEntityDto : IEntityDto<TPrimaryKey>
  51. where TUpdateInput : IEntityDto<TPrimaryKey>
  52. where TGetInput : IEntityDto<TPrimaryKey>
  53. {
  54. }
  55. #endregion
  56. }