“System.ArgumentException”类型的未经处理的win32异常异常在 System.Data.dll 中发生

匿名用户不能发表回复!|“System.NotSupportedException”类型的异常在 System.Data.Entity.dll 中发生,但未在用户代码中进行处理 其他信息: 在 LINQ to Entitie
“System.NotSupportedException”类型的异常在&System.Data.Entity.dll&中发生,但未在用户代码中进行处理
其他信息:&在&LINQ&to&Entities&查询中无法构造实体或复杂类型“**Model.**Entity”。
出现原因:
EF中有实体EntityA,对实体进行扩展,比如增加了一个字段PropertyA
Public&partial&class&EntityA
&&&[DataMember]
&&&&&&&&public&string&PropertyA{&&&}
然后在service端进行如下调用时出现此错误。
&&&var&q&=&&&&&&&&from&c&in&EntityA&&&&&&&&join&p&in&EntityB&on&c&equals&p.Category&&&&&&&&select&new&EntityA{&PropertyA=&p.ProductName&};
解决方法:
把&select&new&的EntityA去掉即可。如下:
&var&q&=&&&&&&&&from&c&in&EntityA&&&&&&&&join&p&in&EntityB&on&c&equals&p.Category&&&&&&&&select&new&{&PropertyA=&p.ProductName&};
看过本文的人也看了:
我要留言技术领域:
取消收藏确定要取消收藏吗?
删除图谱提示你保存在该图谱下的知识内容也会被删除,建议你先将内容移到其他图谱中。你确定要删除知识图谱及其内容吗?
删除节点提示无法删除该知识节点,因该节点下仍保存有相关知识内容!
删除节点提示你确定要删除该知识节点吗?当前位置:
“SystemArgumentNullException”类型的未经处理的异常在 Systemdll 中发生
“SystemArgumentNullException”类型的未经处理的异常在 Systemdll 中发生
来源:网络整理&&&&&时间: 0:22:16&&&&&关键词:
关于网友提出的““SystemArgumentNullException”类型的未经处理的异常在 Systemdll 中发生”问题疑问,本网通过在网上对““SystemArgumentNullException”类型的未经处理的异常在 Systemdll 中发生”有关的相关答案进行了整理,供用户进行参考,详细问题解答如下:
问题:“SystemArgumentNullException”类型的未经处理的异常在 Systemdll 中发生
public&WvSession(string&server)
&&&&&&&&&&&&this.server&=&
&&&&&&&&&&&&string&str&=&SendCommand("open.cgi");
&&&&&&&&&&&&Match&m&=&Regex.Match(str,&"s:=(.+)");&&&&&&&&//错误代码
&&&&&&&&&&&&if&(m.Success)
&&&&&&&&&&&&&&&&connectionId&=&m.Groups[1].V
求大神解释一下怎么回事解决方案1:
ArgumentNull,参数str为null
解决方案2:string&str&=&SendCommand("open.cgi");
if(!string.IsNullOrEmpty(str))
&&&&Match&m&=&Regex.Match(str,&"s:=(.+)");&&&&&&&&//错误代码
}解决方案3:
str&==null
以上介绍了““SystemArgumentNullException”类型的未经处理的异常在 Systemdll 中发生”的问题解答,希望对有需要的网友有所帮助。
本文网址链接:http://www.codes51.com/itwd/1170047.html
上一篇: 下一篇:匿名用户不能发表回复!|

我要回帖

更多关于 未经处理的win32异常 的文章

 

随机推荐