IService.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using MTWorkHR.Application.Models;
  2. using System.Threading.Tasks;
  3. namespace MTWorkHR.Application.Services.Interfaces
  4. {
  5. public interface IService<TEntity, TDto, TGetAllDto>
  6. where TEntity : class
  7. where TDto : class
  8. where TGetAllDto : class
  9. {
  10. Task<PagingResultDto<TGetAllDto>> GetAll(PagingInputDto pagingInputDto);
  11. Task<TDto> GetById(long id);
  12. Task Delete(long id);
  13. Task<TDto> Create(TDto input);
  14. Task<TDto> Update(TDto input);
  15. }
  16. public interface IService<TEntity, TDto, TUpdatDto, TGetAllDto>
  17. where TEntity : class
  18. where TDto : class
  19. where TUpdatDto : class
  20. where TGetAllDto : class
  21. {
  22. Task<PagingResultDto<TGetAllDto>> GetAll(PagingInputDto pagingInputDto);
  23. Task<TDto> GetById(long id);
  24. Task Delete(long id);
  25. Task<TDto> Create(TDto input);
  26. Task<TDto> Update(TUpdatDto input);
  27. }
  28. public interface IService<TEntity, TGetDto,TCreateDto, TUpdatDto, TGetAllDto>
  29. where TEntity : class
  30. where TGetDto : class
  31. where TCreateDto : class
  32. where TUpdatDto : class
  33. where TGetAllDto : class
  34. {
  35. Task<PagingResultDto<TGetAllDto>> GetAll(PagingInputDto pagingInputDto);
  36. Task<TGetDto> GetById(long id);
  37. Task Delete(long id);
  38. Task<TGetDto> Create(TCreateDto input);
  39. Task<TGetDto> Update(TUpdatDto input);
  40. }
  41. }