调用以下存储过程后出现错误:
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 完全匹配。任何帮助,将不胜感激。