public dynamic ImprimirRotina([FromBody] ImprimirRotinaCommands command)
        {
            var rotina = _rotinaRepositorio.Imprimir(command.RotinaId);

            var obj = TemplateGenerator.ImprimirRotina(rotina);

            var pdf = RetornoPdf.Retorno(obj, "assets", "styles.css", Orientation.Landscape);


            //file = _converter.Convert(pdf);


            //var pdf = new HtmlToPdfDocument()
            //{
            //    GlobalSettings = ConfiguracaoPdf._GlobalSettings(Orientation.Landscape),
            //    Objects = { ConfiguracaoPdf._ObjectSettings(obj, "assets", "style.css") }
            //};

            //_converter.Convert(pdf); IF WE USE Out PROPERTY IN THE GlobalSettings CLASS, THIS IS ENOUGH FOR CONVERSION

            var file = _converter.Convert(pdf);

            //return Ok("Successfully created PDF document.");
            //return File(file, "application/pdf", "EmployeeReport.pdf"); USE THIS RETURN STATEMENT TO DOWNLOAD GENERATED PDF DOCUMENT
            return(File(file, "application/pdf"));
        }
        public dynamic ListarTodos(Guid rotinaId)
        {
            var retorno = _rotinaRepositorio.Imprimir(rotinaId);

            var t = retorno.ListarHorarioRotinaResults.GroupBy(s => s.Aula).Select(c => c.ToList().OrderBy(a => a.Order));



            if (retorno != null)
            {
                return(t);
            }

            return(null);
        }