public dynamic ListarTodasOcorrencias([FromBody] FiltroOcorrenciaCommands command) { try { if (!command.IsValid()) { return(new ComandResult(false, "Por favor corrija os campos abaixo", command.Notifications)); } byte[] file; //var t = _ocorrenciaRepositorio.RetornoTotalOcorrencia(command); var retorno = _ocorrenciaRepositorio.Filtrar(command); var obj = TemplateGenerator.ListarOcorrencias(retorno); var pdf = RetornoPdf.Retorno(obj, "assets", "styles.css", Orientation.Landscape); file = _converter.Convert(pdf); return(File(file, "application/pdf")); } catch (NullReferenceException ex) { return(ex.Message); } }