public void Log() { try { loggingDataContext db = new loggingDataContext(); IPtoDNS ip = GetOrCreateIP(GetIp().ToString()); HttpRequest req = HttpContext.Current.Request; APIAnalytic entry = new APIAnalytic { ID = Guid.NewGuid(), addressID = ip.ID, url = req.Url.OriginalString, method = req.Url.LocalPath, querystring = req.Url.Query, referrer = req.ServerVariables["HTTP_REFERER"], HttpMethod = req.HttpMethod, date = DateTime.Now }; db.APIAnalytics.InsertOnSubmit(entry); db.SubmitChanges(); } catch { } }
private void detach_APIAnalytics(APIAnalytic entity) { this.SendPropertyChanging(); entity.IPtoDNS = null; }
partial void DeleteAPIAnalytic(APIAnalytic instance);
partial void UpdateAPIAnalytic(APIAnalytic instance);
partial void InsertAPIAnalytic(APIAnalytic instance);