public IActionResult Filtrar([FromBody] FiltroGenericoViewModelBase <ForecastVM> filtro) { try { var filtroDto = Mapper.Map <FiltroGenericoDtoBase <ForecastDto> >(filtro); var resultBD = _forecastService.Filtrar(filtroDto); var resultVM = Mapper.Map <FiltroGenericoViewModelBase <ForecastDto> >(resultBD); return(Ok(resultVM)); } catch (Exception ex) { return(BadRequest(ex.Message)); } }