MVC#实体框架错误:数据读取器与指定的

MVC#实体框架错误:数据读取器与指定的,c#,asp.net-mvc-3,entity-framework,stored-procedures,C#,Asp.net Mvc 3,Entity Framework,Stored Procedures,调用以下存储过程后出现错误: var result = db.APP_Client_Update(clientID,[and other parameters here]).ToList(); 错误是: The data reader is incompatible with the specified 'ClientModel.APP_Client_Update_Result'. A member of the type, 'retcode', does not have a corre

调用以下存储过程后出现错误:

var result = db.APP_Client_Update(clientID,[and other parameters here]).ToList();
错误是:

The data reader is incompatible with the specified 
'ClientModel.APP_Client_Update_Result'. 
A member of the type, 'retcode', does not have a corresponding 
column in the data reader with the same name.
存储过程返回以下内容: 如果我找不到唱片,那么

If @WorkflowID is null or not exists 
(Select 1 from Clients_Changes where ClientID = @ClientID)
BEGIN
    Select '-999' as retcode, 
'Unable to update client record, something is wrong' as retmessage
    Return 0
END
如果成功

IF @@TRANCOUNT > 0 
BEGIN
COMMIT TRANSACTION
Select '1' as retcode, 'Client Updated Successfully' as retmessage 
END

我到处寻找解决方案,但似乎找不到,我已经确保我的mvc解决方案中的所有返回类型都与retcode和retmessage完全匹配。任何帮助都将不胜感激。

运行SQL Profiler后,问题似乎出现在存储过程中。我能够缩小错误范围

在SP中这样的查询有什么意义?返回代码本身确切地说明客户端是否已更新,生成消息是应用程序的责任,而不是存储过程的责任。如何映射过程?我通过将存储过程添加到实体数据模型来映射存储过程,然后执行函数导入并创建复杂类型。它将retcode和retmessage识别为存储过程的返回值。然后我添加了EF5.xDBContext生成器。上面是我的存储过程的一个片段,retcode和retmessage只是让我知道我是否成功。