/// <summary> /// 查询后的数据排序返回list /// </summary> /// <typeparam name="Z">类型</typeparam> /// <param name="mongoCursor">查询出的数据</param> /// <param name="orderStr">排序字符</param> /// <returns>数据排序返回list</returns> public List <Z> ReturnList <Z>(MongoCursor <Z> mongoCursor, string orderStr) { if (!string.IsNullOrEmpty(orderStr)) { SortByDocument sortByDocument = GetSortFromStr(orderStr); mongoCursor = mongoCursor.SetSortOrder(); } return(mongoCursor.ToListEntity <Z>()); }