【发布时间】:2015-05-13 13:47:52
【问题描述】:
我正在尝试从 EntityFramework 访问存储过程。
我已按照以下步骤操作:
首先我在 Azure 数据库中创建了存储过程:
然后,我从数据库中更新了 .edmx 模型,只选择了我想要的 StoredProcedure。
完成后,在函数导入中,我看到添加了 StoredProcedure,但未在 StoredProcedures 部分中。 我该怎么做才能让它出现在这里?
在函数导入部分,所有参数都设置为输入,而“MaxReference”应标记为输出。 怎么改?
虽然这两个问题我已经执行了代码:
我得到了以下异常:
EntityCommandCompilationException
An error occurred while preparing command definition. See the inner exception for details.
和 InnerException:
The function import 'DataModelEntities.AssignMaxSalesRef' cannot be executed because it is not assigned to a storage function.
【问题讨论】:
标签: c# entity-framework azure stored-procedures