Пример #1
0
        public bool Create(Domain.VisitedLog entity)
        {
            if (_AppLogRepository == null)
            {
                return(false);
            }

            return(_AppLogRepository.Create(entity));
        }
Пример #2
0
        public bool Create(LogLevel logLevel, string title, string description = "")
        {
            var entity = new Domain.VisitedLog();

            entity.LogLevel       = logLevel;
            entity.Title          = title;
            entity.Url            = _appContext.HttpContext.GetThisPageUrl();
            entity.UrlReferrer    = _appContext.HttpContext.GetUrlReferrer();
            entity.SystemUserId   = _appContext.GetFeature <Identity.ICurrentUser>().SystemUserId;
            entity.StatusCode     = _appContext.HttpContext.Response.StatusCode;
            entity.Description    = description;
            entity.ClientIP       = _appContext.HttpContext.GetClientIpAddress();
            entity.CreatedOn      = DateTime.Now;
            entity.OrganizationId = _appContext.GetFeature <Identity.ICurrentUser>().OrganizationId;
            return(Create(entity));
        }