public async Task <ApiResponse <List <MotivoGanarPerderGetDto> > > GetByCondicion(MotivoGanarPerderQueryFilter filter) { List <MotivoGanarPerderGetDto> resultDto = new List <MotivoGanarPerderGetDto>(); Metadata metadata = new Metadata { IsValid = true, Message = "" }; ApiResponse <List <MotivoGanarPerderGetDto> > response = new ApiResponse <List <MotivoGanarPerderGetDto> >(resultDto); var motivos = await _unitOfWork.MotivoGanarPerderRepository.GetAllByCondicion(filter.Condicion); resultDto = _mapper.Map <List <MotivoGanarPerderGetDto> >(motivos); response.Data = resultDto; response.Meta = metadata; return(response); }
public async Task <IActionResult> MotivoGanarPerderGetAllFilter(MotivoGanarPerderQueryFilter filters) { var response = await _motivoGanarPerderService.GetByCondicion(filters); return(Ok(response)); }