首页 新闻 会员 周边

C#的问题

0
悬赏园豆:10 [已关闭问题] 关闭于 2010-11-02 06:40

程序运行时出现的错误提示:

Exception Details: System.InvalidOperationException: The type parameter 'JcqSolutions.JcqCommerce.BusinessLogic.Content.AdvertismentsManagement.Advertisment' in ExecuteFunction is incompatible with the type 'JcqSolutions.JcqCommerce.BusinessLogic.Data.Advertisment' returned by the function.

Source Error:

Line 2632:            ObjectParameter totalRecordsParameter = new ObjectParameter("TotalRecords", typeof(int));
Line 2633:
Line 2634: var result = base.ExecuteFunction<Advertisment>("Sp_AdvertismentLoadAll",
Line 2635: showHiddenParameter, pageSizeParameter,
Line 2636: pageIndexParameter, totalRecordsParameter).ToList();


Source File: E:\Downloads\jcqCommerce_1.10_Source\Libraries\Jcq.BusinessLogic\Data\JcqObjectContext.cs    Line: 2634

我在数据库中新加了一个表,后台程序通过存储过程访问这个表的数据,在调用存储过程时出现了返回类型不匹配的错误。

这段代码在应用到了linq环境后才出现这个问题的,之前是好用的,是映射的model的错误还是代码有问题呢

全网的主页 全网 | 初学一级 | 园豆:133
提问于:2010-10-25 14:36
< >
分享
所有回答(1)
0
将 var result = base.ExecuteFunction<Advertisment>("Sp_Adv

改为 

var result = base.ExecuteFunction<JcqSolutions.JcqCommerce.BusinessLogic.Data.Advertisment>("Sp_Adv
试试
avenger | 园豆:215 (菜鸟二级) | 2010-10-25 17:34
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册