public async Task <IListDto <CustomerDto> > GetAllCustomersAsync(CustomerRequestAllDto key) { return(await GetAllAsync <CustomerDto>(key, c => (key.Cpf.IsNullOrEmpty() || c.Cpf.Equals(key.Cpf)) && (key.Email.IsNullOrEmpty() || c.Email.Equals(key.Email)) && (key.Rg.IsNullOrEmpty() || c.Rg.Equals(key.Rg)))); }
public Task <IListDto <CustomerDto> > GetAllAsync(CustomerRequestAllDto request) { IListDto <CustomerDto> result = new ListDto <CustomerDto> { HasNext = false, Items = list }; return(result.AsTask()); }
public async Task <IActionResult> GetAll([FromQuery] CustomerRequestAllDto requestAll) { if (requestAll == null) { return(BadRequest(ListDto <CustomerDto> .Empty())); } var response = await _customerDomainService.GetAllAsync <CustomerDto>(requestAll, (c) => requestAll.Name.IsNullOrEmpty() || c.Name.Contains(requestAll.Name)); return(CreateResponseOnGetAll(response, _name)); }
public async Task <IActionResult> GetAll([FromQuery] CustomerRequestAllDto requestDto) { var response = await _appService.GetAllAsync(requestDto); return(CreateResponseOnGetAll(response, _name)); }
public async Task <IListDto <CustomerDto> > GetAllAsync(CustomerRequestAllDto request) => await _service.GetAllAsync <CustomerDto>(request, c => request.Name.IsNullOrEmpty() || c.Name.Contains(request.Name));
public async Task <IListDto <CustomerDto> > GetAllAsync(CustomerRequestAllDto request) => await _repository.GetAllCustomersAsync(request);