public ActionResult Index(string id, Guid cc, string path, string wvri, string a, int w, int h, int st, int sl) { if (a == "pulse") { Visit v = visitRepository.GetVisitByCC(cc); VisitPage vp = null; Webpage wp = null; if (v != null) { v.LastPingDate = DateTime.UtcNow; visitRepository.UpdateVisit(v); visitRepository.Save(); Uri u = new Uri(path); wp = webpageRepository.GetWebpage(v.Website.ID, u.AbsolutePath.Trim(), u.Query.Trim()); if (wp != null) { vp = visitRepository.GetLastVisitedPageofVisit(v.ID); if (vp != null && vp.webpage.ID == wp.ID) { vp.LastPingDate = DateTime.UtcNow; vp.BrowserHeight = h; vp.BrowserWidth = w; visitRepository.UpdateVisitPage(vp); visitRepository.Save(); } else { vp = new VisitPage() { LastPingDate = DateTime.UtcNow, visit = v, webpage = wp, DateCreated = DateTime.UtcNow, BrowserHeight = h, BrowserWidth = w, ScrollTop = st, ScrollLeft = sl }; visitRepository.InsertVisitPage(vp); visitRepository.Save(); } } } } return(base.File(Server.MapPath("~/content/trans.png"), "image/png")); }