好久没用mongodb了...最近又开始用起来了.

遇到情景:

 
2句话分开写.是正常的,因为我是先取再排序的
 
然而.我想直接排序出来.
就写在了一起.最后.ToList()
 
然后报 Unable to determine the serialization information for the expression
说明  mongodb 驱动 没发序列化这个.可能是匿名对象等.
于是 .在AsQueryable后面加了ToArray() .然后写条件...
然后出结果..结果出的慢,是索引问题..
 
 答案原文 : http://stackoverflow.com/questions/11362594/selecting-a-new-type-from-linq-query

]]>

mongodb 排序 Unable to determine the serialization information for the expression 异常的更多相关文章

  1. Unable to determine if the owner (Domain\UserName) of job JOB_NAME has server access

    早上巡检的的时候,发现一数据库的作业报如下错误(作业名等敏感信息已经替换),该作业的OWNER为一个域账号: JOB RUN: 'JOB_NAME' was run on 2016-6-1 at 7: ...

  2. Unable to determine the principal end of an association between the types '***. The principal end of this association must be explicitly configured using either the relationship fluent API or data annotations.

    MVC中数据库表如果是一对一的主键关系时要加[Required]不然会出错Unable to determine the principal end of an association between ...

  3. Unable to determine the device handle for GPU 0000:01:00.0: GPU is lost.问题排坑

    在运行maskrcnn时,会碰到训练不动的问题,就卡在这儿 UserWarning: Converting sparse IndexedSlices to a dense Tensor of unkn ...

  4. proftpd启动失败提示unable to determine IP address of “xxx.com”

    proftpd启动失败提示unable to determine IP address of “xxx.com”这种proftpd启动失败的原因是无法解析后面主机的IP地址,解决方法是在DNS列表中增 ...

  5. WinDbg远程调试unable to initialize target machine information win32 error 0n87

    Debugging Target:Windows XP SP3 32-bit Debugging Host:Windows Server 2012 64-bit 当附加到目标服务器某个进程后,WinD ...

  6. Java Spring Boot: Unable to determine jdbc url from datasource

    如果你和我一样从github或码云上下载了一个几年前别人写的demo代码,想用来做学习用.编译的时候遇到下面这样的错误,然后死命上网查各种方案,百试不灵.试尽了各种方案,就是还连接不上数据库.你可以试 ...

  7. hbase异常:java.io.IOException: Unable to determine ZooKeeper ensemble

    项目中用到hbase,有时候可能会报一些异常,比如java.io.IOException: Unable to determine ZooKeeper ensemble 等等,当出现这个问题时,根据个 ...

  8. hadoop_异常_01_ Unable to determine address of the host-falling back to "localhost" address java.net.UnknownHostException: rayner

    一.异常现象 安装好hadoop之后,执行格式化namenode命令时,抛出以下异常: // :: WARN net.DNS: Unable to determine local hostname - ...

  9. ValueError: Unable to determine SOCKS version from socks://127.0.0.1:1080/

    使用ss之后输入conda指令出现错误:“ValueError: Unable to determine SOCKS version from socks://127.0.0.1:1080/”. 解决 ...

随机推荐

  1. tcp dump 截取http

    监听命令 sudo tcpdump -w mm.txt -s 0 -A -v  tcp dst port 8080 -w mm.txt :把记录下来的数据已二进制格式存储在mm.txt文件内  -w ...

  2. STRUCTS 2 LABLE

    {LJ?Dragon}[标题]structs2标签的作用 {LJ?Dragon}[Diary]2017年,愉快的开始:离别不一定总伤感,虽然只是安慰着自己......... 问与答 问题 在Strut ...

  3. vxworks获取系统时间编程

    #include<time.h> //头文件 unsigned int timeLen; struct timespec tp; struct tm timeBuffer; time_t ...

  4. visual stduio 插件及代码生成器

    下图是本人常用的visual stuido开发工具插件. 2  使用NArrange格式化代码,这个工具,可以将代码格式化,用region分隔开来. NArrange 0.2.9.0 ________ ...

  5. 黑白图像(DFS)

    输入一个n*n的黑白图像(1表示黑色,0表示白色),任务是统计其中八连块的个数.如果两个黑格子有公共边或者公共顶点,就说它们属于同一个八连块.如图6-11所示的图形有3个八连块. 图6-11  拥有3 ...

  6. 第三篇:数据仓库系统的实现与使用(含OLAP重点讲解)

    前言 上一篇重点讲解了数据仓库建模,它是数据仓库开发中最核心的部分.然而完整的数据仓库系统还会涉及其他一些组件的开发,其中最主要的是ETL工程,在线分析处理工具(OLAP)和商务智能(BI)应用等. ...

  7. 屏幕录像专家V7.5(完美破解版,无水印)下载

    分享一个屏幕录像工具.屏幕录像专家V7.5(完美破解版,无水印).经测试可破解使用. 破解注册 点击安装.EXE,安装软件. 点击安装好的屏幕录像专家,会给你一个机器码,要你注册,复制下这个机器码(下 ...

  8. Linux 基本命令(持续更新ing)

    cd -> 变换路径                        //文件一般存在/var/路径下,var为可修改存储盘 ls -> 列出所有隐藏文件与相关文件的属性   #ls -al ...

  9. HDU 4462(暴力枚举)

    因为题目当中的k比较小k <= 10,所以可以直接枚举,题目里面由两个trick, 一个是如果每个点都可以放稻草人的话,那么答案是0, 另外一个就是如果可以放稻草人的点不用被照到.知道了这两个基 ...

  10. (转)DEDECMS 如何让栏目外部链接在新窗口中打开

    近遇到一个问题,就是dedecms的导航,是用外部链接的,但是原窗口打开不好看,新窗口打开好点.OK,放狗... 1. 查找模板中的head.htm将<li><a href='[fi ...