예제 #1
0
파일: APIAnalytic.cs 프로젝트: janiukjf/API
 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 { }
 }
예제 #2
0
		private void detach_APIAnalytics(APIAnalytic entity)
		{
			this.SendPropertyChanging();
			entity.IPtoDNS = null;
		}
예제 #3
0
 partial void DeleteAPIAnalytic(APIAnalytic instance);
예제 #4
0
 partial void UpdateAPIAnalytic(APIAnalytic instance);
예제 #5
0
 partial void InsertAPIAnalytic(APIAnalytic instance);