EF6可以从oracle存储过程返回的参考游标生成我的模型对象 [英] Can EF6 generate my model objects from a ref cursor returned by an oracle stored procedure

查看:323
本文介绍了EF6可以从oracle存储过程返回的参考游标生成我的模型对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

EF6可以从oracle存储过程返回的参考光标中生成我的模型对象吗?

Can EF6 generate my model objects from a ref cursor returned by an oracle stored procedure??

所以我目前的工作场所正在使用webforms到MVC5。

So my current workplace is in the middle of a switch from using webforms to MVC5.

我们想使用EF6和Oracle存储过程。我们想要实现的很多模型将是从多个表中选择数据(我们的数据库是巨大的)。我们也已经有一些存储过程。

We would like to use EF6 and Oracle stored procedures. A lot of the models that we want to implement will be selecting data from multiple tables(our database is massive). We already have some stored procedures already as well.

我或者需要能够告诉EF6将我的模型映射到存储过程的结果或明确告诉EF6哪个表中我的每个模型的属性来自。

I either need to be able to tell EF6 to map my models to the results of a stored procedure or explicitly tell EF6 which table each of my models attributes is coming from.

另一个选项是为每个模型创建oracle视图。

The other option would be to create oracle views for each model.

我一直在搜索一段时间,我很难找到一种方法来完成我们所需要的。

I've been googling around for a while and I'm having a hard time finding a way to accomplish what we need.

之前,当我们使用webforms我们使用我们自己的定制DAL / ORM。但是我们真的希望切换到使用实体框架。

Before, when we used webforms, we were using our own custom DAL/ORM. But we would really like to switch to using Entity Framework.

推荐答案

似乎我正在尝试完成的不受支持。 EF6只支持创建/更新/删除存储过程。希望我们可以找出一种使用MVC5与我们已经有的oracle数据库的标准方式。

It seems what I was trying to accomplish isn't supported. EF6 only supports create/update/delete stored procedures. Hopefully we can figure out a standard way of using MVC5 with the oracle DB we already have in place.

谢谢你McKeown的努力,你的链接帮助我我的结论。

Thank you T McKeown for your efforts, your links helped lead me to my conclusion.

这篇关于EF6可以从oracle存储过程返回的参考游标生成我的模型对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆