IRepositoryBaseById.cs 594 B

1234567891011121314151617181920212223
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace Ropin.Inspection.Repository
  7. {
  8. public interface IRepositoryBaseById<T, TId>
  9. {
  10. // 根据指定的实体Id获取实体
  11. Task<T> GetByIdAsync(TId id);
  12. // 检查具有指定Id的实体是否存在
  13. Task<bool> IsExistAsync(TId id);
  14. /// <summary>
  15. /// 指定Id的实体删除
  16. /// </summary>
  17. /// <param name="id"></param>
  18. /// <returns></returns>
  19. Task<bool> DeleteAsync(TId id);
  20. }
  21. }