Exemple #1
0
 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 { }
 }
Exemple #2
0
		private void detach_APIAnalytics(APIAnalytic entity)
		{
			this.SendPropertyChanging();
			entity.IPtoDNS = null;
		}
Exemple #3
0
 partial void DeleteAPIAnalytic(APIAnalytic instance);
Exemple #4
0
 partial void UpdateAPIAnalytic(APIAnalytic instance);
Exemple #5
0
 partial void InsertAPIAnalytic(APIAnalytic instance);