/// <summary> /// 获取数据 /// </summary> /// <param name="dto"></param> /// <returns></returns> public async Task <PageOutputDto <RoleOutputDto> > PageAsync(PageRoleInputDto dto) { return(await _roleRepository.Select.WhereIf(dto.Enabled.HasValue, o => o.Enabled == dto.Enabled).ToPageResultAsync <RoleEntity, RoleOutputDto>(dto , o => dto.Search.IsNull() || o.Name.Contains(dto.Search) || o.Description.Contains(dto.Search) , o => o.OrderSort, Core.Core.DatabaseAccessor.Enums.SortType.ASC )); }
public async Task <PageOutputDto <RoleOutputDto> > PageAsync(PageRoleInputDto dto) => await _iRoleContract.PageAsync(dto);
/// <summary> /// 获取数据 /// </summary> /// <param name="dto"></param> /// <returns></returns> public async Task <PageOutputDto <RoleOutputDto> > PageAsync(PageRoleInputDto dto) { return(await _roleRepository.Select.ToPageResultAsync <Role, RoleOutputDto>(dto, null)); }
public async Task <PageOutputDto <RoleOutputDto> > GetPage([FromQuery] PageRoleInputDto dto) { return(await _roleService.PageAsync(dto)); }