public ActionResult Display() { var xmlFile = $"{Server.MapPath("~")}/testlog.xml"; var xmlLog = new XMLLog(xmlFile); ViewBag.LogDetails = xmlLog.ReadLog(); return(View()); }
// GET: Home public ActionResult Index() { var xmlFile = $"{Server.MapPath("~")}/testlog.xml"; var xmlLog = new XMLLog(xmlFile); xmlLog.WriteToLog("Start at the Index() method"); xmlLog.WriteToLog("Another log entry here"); xmlLog.WriteToLog("Before the return statement"); return(View()); }
public Logger(XMLLog xMLLog, DbLog dbLog) { _xMLLog = xMLLog; _dbLog = dbLog; }