实体框架和Oracle用户定义函数. [英] Entity Framework and Oracle User Defined Functions.

查看:134
本文介绍了实体框架和Oracle用户定义函数.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用DeVart DotConnect for Oracle Entity Developer创建我的模型.一切正常,但是我需要使用Oracle的一些用户定义函数.

是否可以这样做,如果可以,要执行什么步骤?

I am using DeVart DotConnect for Oracle Entity Developer to create my model. Everything is working properly, but I need to use some user defined functions from Oracle.

Is it possible to do this and if it is, what are the steps to make it work?

推荐答案

据我所知,您不能直接在EF中使用函数.使用ODP.Net,您可以通过函数导入将存储过程映射到EF(例如,请参见:
As far as I know you cannot use functions directly with EF. With ODP.Net you can map stored procedures to EF via function import (see for example: http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/dotnet/EntityFrameworkOBE/EntityFrameworkOBE.htm[^]) and you can use functions of course in custom SQL statements for example if you embed a scalar function call inside a statement.

One workaround could be that you create a proper SQL statement with functions you want to use and create a view based on that statement.


这篇关于实体框架和Oracle用户定义函数.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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