在LINQ中调用SP [英] Call SP in LINQ

查看:68
本文介绍了在LINQ中调用SP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


推荐答案

嗨Rebmaamberrebmaamber,

Hi Rebmaamberrebmaamber,

看起来你的ts.griddataresult方法返回一个nullable int?的集合,但是你要将你的类型'T'指定为类tblRegion_Uni。

It looks like your ts.griddataresult method returns a collection of nullable int?, but you are specifying your type 'T' to be of class tblRegion_Uni.

为了更正此异常,您需要将列表类型更改为int?,或者从方法griddataresult更改返回类型。

In order for this exception to be corrected, you would either need to change the list type to int?, or change the return type from your method griddataresult.

抛出异常的原因到期类型差异,以及编译器无法将类型转换为您所获得的类型与您期望的类型。

The reason its throwing exception is due to the type difference, and the compiler's inability to convert the types from what you are getting versus what you are expecting.

祝你好运。

这篇关于在LINQ中调用SP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆