EF中Unable to create a constant value of type...的错误解决
来源:互联网 发布:手机剪辑视频软件 编辑:程序博客网 时间:2024/05/20 23:37
出现此错误的原因是因为在进行查询之类的操作中,未使用基本数据类型
举个栗子
td.translations.Where(t => t.textinfo == ti).Count()
错误,此处使用了实体外键textinfo而非其id,EF的查询运算只能用int,string之类的基本数据类型
可以修改为:
td.translations.Where(t => t.textinfo.Id == ti.Id).Count()
使用数据类型为int的主键Id进行计算
阅读全文
0 0
- EF中Unable to create a constant value of type...的错误解决
- Unable to create a constant value of type 'Closure type'.异常
- Unknown debugger type "No engine" Unable to create a debugger engine of the type "No engine"
- Genymotion模拟器出现Unable to create virtual device Fail to create SD card错误的解决
- Null value was assigned to a property of primitive type setter of"原因及解决方
- Null value was assigned to a property of primitive type setter of"原因及解决方
- Null value was assigned to a property of primitive type setter of"原因及解决方
- Null value was assigned to a property of primitive type setter of"原因及解决方
- Unable to find a value for "Sex" in object of class ...错误
- [解决]Hive执行语句:Unable to create temp file for insert values Expression of type TOK_FUNCTION not suppor
- Null value was assigned to a property of primitive type setter问题分析与解决
- Null value was assigned to a property of primitive type setter问题分析与解决
- Value of type java.lang.String cannot be converted to JSONObject 错误解决
- 解决“在eclipse中配置Tomcat时,出现Cannot create a server using the selected type的错误”的问题
- 解决“在eclipse中配置Tomcat时,出现Cannot create a server using the selected type的错误”的问题
- Null value was assigned to a property of primitive type setter of的bug
- Null value was assigned to a property of primitive type setter of 的原因与解决方案
- 解决错误:unable to find a version of the runtime to run this application
- jzoj3453【NOIP2013中秋节模拟】连通块(connect,并查集,二维)
- java 对象集合去重记录
- jzoj 3453_连通块_并查集
- Java中数组的简单使用
- android动画—alpha
- EF中Unable to create a constant value of type...的错误解决
- OpenCV遍历和输出Mat矩阵中数据方法总结
- 5-2 寻找大富翁 (25分)
- C语言各个数据类型字节数
- Android-SharedPreferences实现记住密码和自动登录
- postgresql数据库查询当前数据库、当前用户
- C#---字典按值升序,判断键是否存在,遍历
- 移动互联网十大业务模式:
- jquery初学完成tap标签+iframe前端页面的点击切换事件