IVzCrudAppService.cs 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. using Abp.Application.Services;
  2. using Abp.Application.Services.Dto;
  3. using VberZero.AppService.Base.Dto;
  4. namespace VberZero.AppService.Base;
  5. public interface IVzCrudAppService<TEntityDto, TPrimaryKey, in TGetAllInput, in TCreateInput, in TUpdateInput, in TGetInput, in TDeleteInput> : IApplicationService
  6. {
  7. Task<TEntityDto> GetDto(TGetInput input);
  8. Task<TEntityDto> GetDtoById(TPrimaryKey id);
  9. Task<TEntityDto> GetDtoByNo(string no);
  10. Task<PagedResultDto<TEntityDto>> GetAll(TGetAllInput input);
  11. Task Create(TCreateInput input);
  12. Task Update(TUpdateInput input);
  13. Task Delete(TDeleteInput input);
  14. }
  15. #region AppService
  16. public interface IVzCrudAppService<TEntityDto>
  17. : IVzCrudAppService<TEntityDto, int>
  18. where TEntityDto : IVzEntityDto<int>
  19. {
  20. }
  21. public interface IVzCrudAppService<TEntityDto, TPrimaryKey>
  22. : IVzCrudAppService<TEntityDto, TPrimaryKey, PagedAndSortedResultRequestDto>
  23. where TEntityDto : IVzEntityDto<TPrimaryKey>
  24. {
  25. }
  26. public interface IVzCrudAppService<TEntityDto, TPrimaryKey, in TGetAllInput>
  27. : IVzCrudAppService<TEntityDto, TPrimaryKey, TGetAllInput, TEntityDto, TEntityDto>
  28. where TEntityDto : IVzEntityDto<TPrimaryKey>
  29. {
  30. }
  31. public interface IVzCrudAppService<TEntityDto, TPrimaryKey, in TGetAllInput, in TCreateInput>
  32. : IVzCrudAppService<TEntityDto, TPrimaryKey, TGetAllInput, TCreateInput, TCreateInput>
  33. where TEntityDto : IVzEntityDto<TPrimaryKey>
  34. where TCreateInput : IVzEntityDto<TPrimaryKey>
  35. {
  36. }
  37. public interface IVzCrudAppService<TEntityDto, TPrimaryKey, in TGetAllInput, in TCreateInput, in TUpdateInput>
  38. : IVzCrudAppService<TEntityDto, TPrimaryKey, TGetAllInput, TCreateInput, TUpdateInput, VzEntityDto<TPrimaryKey>>
  39. where TEntityDto : IVzEntityDto<TPrimaryKey>
  40. where TUpdateInput : IVzEntityDto<TPrimaryKey>
  41. {
  42. }
  43. public interface IVzCrudAppService<TEntityDto, TPrimaryKey, in TGetAllInput, in TCreateInput, in TUpdateInput, in TGetInput>
  44. : IVzCrudAppService<TEntityDto, TPrimaryKey, TGetAllInput, TCreateInput, TUpdateInput, TGetInput, VzEntityDto<TPrimaryKey>>
  45. where TEntityDto : IVzEntityDto<TPrimaryKey>
  46. where TUpdateInput : IVzEntityDto<TPrimaryKey>
  47. where TGetInput : IVzEntityDto<TPrimaryKey>
  48. {
  49. }
  50. #endregion AppService