如何通过ADO.NET数据服务(Astoria)调用作为实体框架函数导入公开的存储过程?

时间:2022-04-05 02:20:27

I've created an Entity Data Model and imported several stored procedures as Function Imports. I'm exposing the EDM through ADO.NET Data Services (ANDS). Does ANDS automatically expose the functions through its REST API, or do I need to manually add operations to the service?

我创建了一个实体数据模型,并导入了几个存储过程作为函数导入。我通过ADO.NET数据服务(ANDS)公开EDM。 ANDS是否通过其REST API自动公开函数,还是需要手动向服务添加操作?

1 个解决方案

#1


0  

You will need to expose the sproc through a ServiceOperation. From what I can tell, all mapping to a FunctionImport does is make it usable within the service via CurrentDataSource. Think of it as only a link between the concept and store.

您需要通过ServiceOperation公开sproc。据我所知,所有到FunctionImport的映射都是通过CurrentDataSource使它在服务中可用。可以把它想象成概念和商店之间的联系。

#1


0  

You will need to expose the sproc through a ServiceOperation. From what I can tell, all mapping to a FunctionImport does is make it usable within the service via CurrentDataSource. Think of it as only a link between the concept and store.

您需要通过ServiceOperation公开sproc。据我所知,所有到FunctionImport的映射都是通过CurrentDataSource使它在服务中可用。可以把它想象成概念和商店之间的联系。