public async Task <IActionResult> GetAll([FromQuery] ProductRequestAllDto requestAll) { if (requestAll == null) { return(BadRequest(ListDto <ProductDto> .Empty())); } var response = await _productDomainService.GetAllAsync <ProductDto>(requestAll, (p) => requestAll.Description.IsNullOrEmpty() || p.Description.Contains(requestAll.Description)); return(CreateResponseOnGetAll(response, name)); }
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)); }