コード例 #1
0
ファイル: LoggerService.cs プロジェクト: mostLog/ASPNETCORE
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public PagedListResult <LogListOutput> GetLogPagedList(LogSearchInput input)
        {
            int count = 0;
            var list  = _loggerDataProvider.GetLogs(input.DateTime, input.LogLevel, input.PageIndex, input.PageSize, ref count);

            AutoMapper.Mapper.Initialize(cfg => cfg.CreateMap <Log, LogListOutput>());
            return(new PagedListResult <LogListOutput>()
            {
                Data = AutoMapper.Mapper.Map <IList <LogListOutput> >(list),
                Count = count,
                Code = 0
            });
        }
コード例 #2
0
 /// <summary>
 /// 获取分页信息
 /// </summary>
 /// <param name="input"></param>
 /// <returns></returns>
 public IActionResult GetPagedList(LogSearchInput input)
 {
     return(Json(_loggerService.GetLogPagedList(input)));
 }