public static BusinessLogPageResult <object> Page(BusinessLogKeywordPageInfo dto) { var bf = Builders <BusinessLog> .Filter; var filter = bf.Empty; if (!string.IsNullOrWhiteSpace(dto.SearchKey)) { filter &= bf.Where(x => x.Text.Contains(dto.SearchKey)); } var query = Coll.Find(filter); var total = query.CountDocuments(); var list = query.Project(x => new { x.Id, x.App, x.Business, x.OperateType, x.Key, x.Operator, x.Text }).SortByDescending(x => x.Id).Skip((dto.PageIndex - 1) * dto.PageSize).Limit(dto.PageSize).ToList(); return(BusinessLogPageResult.WrapDynamic(total, list)); }