public List <LoginLogGridDto> GetList(Pagination pagination, string keyword) { var specification = new Specification <LoginLog>(u => u.DeletedMark == false); var pagingOptions = new PagingOptions <LoginLog, DateTime?>(pagination.page, pagination.rows, x => x.CreationTime, isDescending: true); if (!string.IsNullOrEmpty(keyword)) { specification = new Specification <LoginLog>(u => u.DeletedMark == false && (u.UserName.Contains(keyword))); } var list = loginLogRepository.FindAll(specification, pagingOptions).ToList(); pagination.records = pagingOptions.TotalItems; return(Mapper.Map <List <LoginLogGridDto> >(list)); }