public dynamic RetornoTotalOcorrencia([FromBody] FiltroOcorrenciaCommands command) { try { if (!command.IsValid()) { return(new ComandResult(false, "Por favor corrija os campos abaixo", command.Notifications)); } byte[] file; var retorno = _ocorrenciaRepositorio.RetornoTotalOcorrencia(command); var obj = TemplateGenerator.TotalOcorrencias(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); } }