Exemple #1
0
        public int AddLog(LogInputDto logInputDto)
        {
            if (string.IsNullOrEmpty(logInputDto.ClientIP))
            {
                logInputDto.ClientIP = _accessor.HttpContext.Connection.RemoteIpAddress.ToString();
            }

            var log = _mapper.Map <MbpOperationLog>(logInputDto);

            _defaultDbContext.MbpOperationLogs.Add(log);

            return(_defaultDbContext.SaveChanges());
        }
Exemple #2
0
 public IQueryable <Log> GetPageList(LogInputDto input)
 {
     return(_logRepository.GetAll().Skip((input.PageIndex - 1) * input.PageSize).Take(input.PageSize));
 }