Unable to create a constant value of type 'System.Object'. Only primitive types or enumeration types are supported in this context.
代码如下:
var query = from s in db.LoginUserServices
join ss in db.Services on s.ServiceType equals ss.Code into s_ss_join
from s_ss in s_ss_join.DefaultIfEmpty()
where s.LoginUserID.Equals(LoginUserID)
select new
{
// ServiceType = s.ServiceType,
ServiceName = s_ss.Name,
ServiceProperty = s_ss.Property,
ServiceCode = s.ServiceType
};
Linq to Array中报错:
报错位置:
Equals
改为:
var query = from s in db.LoginUserServices
join ss in db.Services on s.ServiceType equals ss.Code into s_ss_join
from s_ss in s_ss_join.DefaultIfEmpty()
where s.LoginUserID==LoginUserID
select new
{
// ServiceType = s.ServiceType,
ServiceName = s_ss.Name,
ServiceProperty = s_ss.Property,
ServiceCode = s.ServiceType
};
Unable to create a constant value of type 'System.Object'. Only primitive types or enumeration types are supported in this context.的更多相关文章
- Unable to create a constant value of type 'Closure type'
使用Linq to Entities的时候发生如下异常: Unable to create a constant value of type 'Closure type'. Only primitiv ...
- The type 'System.Object' is defined in an assembly that is not referenced
记录一个错误,报 The type 'System.Object' is defined in an assembly that is not referenced,[System.Runtime] ...
- [Hive - Tutorial] Type System 数据类型
数据类型Type System Hive supports primitive and complex data types, as described below. See Hive Data Ty ...
- Unable to create the store directory. (Exception from HRESULT: 0x80131468)
一个ASP.NET的程序,使用了MS ReportViewer报告控件,在用该控件导出生成Excel文件时,先是提示行不能超过65535. 这个是由于Excel2003的行限制的原因.由于修改成用Ex ...
- JVM虚拟机宕机_java.lang.OutOfMemoryError: unable to create new native thread
原因:当前用户的系统最最大程序数数已达到最大值,使用ulimit -u可以看到是1024 解决办法:在当前用户下使用ulimit -u 65535 然后再执行jsp,一切ok 功能说明:控 ...
- Fatal error in launcher Unable to create process using 'dapppythonpython37python
Fatal error in launcher: Unable to create process using '"d:\app\python\python37\python.exe&quo ...
- 记一次tomcat线程创建异常调优:unable to create new native thread
测试在进行一次性能测试的时候发现并发300个请求时出现了下面的异常: HTTP Status 500 - Handler processing failed; nested exception is ...
- 解决Unable to create new native thread
两种类型的Out of Memory java.lang.OutOfMemoryError: Java heap space error 当JVM尝试在堆中分配对象,堆中空间不足时抛出.一般通过设定J ...
- ArcEngine编辑保存错误:Unable to create logfile system tables
通过ArcEngine对多个SDE中多个图层进行批量编辑处理,其中有部分图层在结束编辑的时候出现错误提示(部分图层可以,只有两个数据较多的图层保存失败). 错误信息:Unable to create ...
随机推荐
- 用matplotlib绘制图像
实例一: import numpy as np import matplotlib.pyplot as plt x=np.linspace(0,6,100) y=np.cos(2*np.pi*x)*n ...
- 在浏览器中输入URL后,执行的全部过程。(一次完整的http请求过程)
整个流程如下: 域名解析 为了将消息从你的PC上传到服务器 上.需要用到1P协议.ARP协议和0SPF协议 发起TCP的3次握手 建立TCP连接后发起http请求 服务器响应htp请求 浏览器解析ht ...
- 安装 VMware Tools
参考帮助文档 错误#1: tar: vmware-tools-distrib: Cannot mkdir: Read-only file system 解决方法: mkdir /mnt/cdrom m ...
- (转)Http状态码301和302概念简单区别及企业应用案例
Http状态码301和302的区别及企业应用案例 原文:http://blog.51cto.com/oldboy/1774260 1.什么是301重定向? 301重定向/跳转一般,表示本网页永久性转移 ...
- Digispark(ATTINY85) 微型开发板驱动安装与开发环境配置教程
前几天无聊就弄了弄这个玩,网上教程可能有点杂,在这里就总结一下. Digispark开发板(也就是badusb)能干什么,自己搜去,/坏笑. 1.准备材料:Attiny85微型 USB接口开发板 Di ...
- CoreJava基础之构造器
类的基本语法: 修饰词 class 类名{ 修饰词 类型 属性名: } 实例:public class Book{ int id; String name; String[] authors ={&q ...
- Tensorflow中的数据对象Dataset
基础概念 在tensorflow的官方文档是这样介绍Dataset数据对象的: Dataset可以用来表示输入管道元素集合(张量的嵌套结构)和"逻辑计划"对这些元素的转换操作.在D ...
- 登录mysql 报 Access denied for user 'root'@'localhost' 错误
安装mysql后登录提示:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password:yes) 解决如下 ...
- LINQ学习(1)
LINQ LINQ,语言集成查询(Language INtegrated Query)是一组用于C#和Visual Basic语言的扩展.它允许编写C#或者Visual Basic代码以查询数据库相同 ...
- ddddddeeeessssssttttrrrrrrooooooyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
我遥远的 POI 计划啊 https://loj.ac/problems/search?keyword=POI2011 atcoder 一套 动态 DP SAM 随便看 XSY 的题 UOJ Roun ...