public ActionResult Informe_Sersa(string ids) { string[] parts = ids.Split(','); // Call Split method List <string> idList = new List <string>(parts); // Use List constructor Database.Connection.OpenAsync(); var query = new FormularioInforme(Database); List <InformeResponse> lista = obtenerInformes(idList); string idAsada = Autenticacion.get_idAsada(); //toma el primer formulario como referencia. guardarInforme(ids, idAsada); string nombreAsada = ""; if (null == idAsada) { nombreAsada = "Administrador"; } else { nombreAsada = obtenerNombreAsada(idAsada); } ActionResult action = query.buildPDF(lista, nombreAsada); return(action); }