private void LogInfo() { LoggerInformation logInfo = new LoggerInformation(); logInfo.UserName = this.Request.LogonUserIdentity.Name; logInfo.RequestUrl = this.Request.Url.AbsoluteUri; logInfo.Browser = this.Request.Browser.Browser; logInfo.RequestType = this.Request.RequestType; logInfo.UserHostAddress = this.Request.UserHostAddress; logger.RecordLog(logInfo); }
public void RecordLog(LoggerInformation logInfo) { objContext.LoggerInformations.Add(logInfo); objContext.SaveChanges(); }