public async Task <IActionResult> Get([FromQuery] FirmanteQueyFilter filter)
        {
            var firmantes    = _service.GetFirmantes(filter);
            var FirmantesDto = _mapper.Map <IEnumerable <Firmante>, IEnumerable <FirmanteResponseDto> >(firmantes);
            var response     = new ApiResponse <IEnumerable <FirmanteResponseDto> >(FirmantesDto);

            return(Ok(response));
        }
Exemple #2
0
        public IEnumerable <Firmante> GetFirmantes(FirmanteQueyFilter filter)
        {
            Expression <Func <Firmante, bool> > exprFinal = firmante => firmante.Id > 0;

            if (!string.IsNullOrEmpty(filter.NombreF) && !string.IsNullOrWhiteSpace(filter.NombreF))
            {
                Expression <Func <Firmante, bool> > expr = firmante => firmante.NombreF.Contains(filter.NombreF);
                exprFinal = exprFinal.And(expr);
            }


            return(_context.Firmante);
        }
Exemple #3
0
 public IEnumerable <Firmante> GetFirmantes(FirmanteQueyFilter filter)
 {
     return(_unitOfWork.FirmanteRepository.GetFirmantes(filter));
 }