public ActionResult OffLine(int code = 0) { investicEntities db = new investicEntities(); var cadenaxml = db.GeneradorConsultaSQLAXML("16306").ToList(); string rutaXML = @"D:\SQLAXML.xml"; System.IO.File.WriteAllText(rutaXML, (cadenaxml[0] != null && cadenaxml[0].ToString() != string.Empty) ? cadenaxml[0].ToString() : "No tiene Registro XML"); ViewBag.Mensaje = dl.ErrorCodes.ErrorCodeToString(code); return(View()); }