예제 #1
0
 /// <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
                                                                                                                                                    ));
 }
예제 #2
0
 public async Task <PageOutputDto <RoleOutputDto> > PageAsync(PageRoleInputDto dto)
 => await _iRoleContract.PageAsync(dto);
예제 #3
0
 /// <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));
 }
예제 #4
0
 public async Task <PageOutputDto <RoleOutputDto> > GetPage([FromQuery] PageRoleInputDto dto)
 {
     return(await _roleService.PageAsync(dto));
 }