简体   繁体   English

如何在 Visual Studio 中将 Oracle 用户定义类型导出为 C# 类?

[英]How do I export an Oracle User-defined Type as a C# class in Visual Studio?

I know there is a way to convert an Oracle User-defined type (UDT) into a C# class using the VS Server Explorer.我知道有一种方法可以使用 VS Server Explorer 将 Oracle 用户定义类型 (UDT) 转换为 C# 类。 I believe you have to right-click on the UDT in the tree press 'Export as C# class' or something similar.我相信您必须右键单击树中的 UDT,然后按“导出为 C# 类”或类似的东西。

I have installed Oracle Developer Tools for VS 2015 & 2017, but when I connect to my Oracle database via VS Server Explorer, I cannot see the UDT folder in the tree.我已经为 VS 2015 和 2017 安装了 Oracle 开发人员工具,但是当我通过 VS 服务器资源管理器连接到我的 Oracle 数据库时,我在树中看不到 UDT 文件夹。 I can see Tables, Procedures & functions but not UDTs.我可以看到表、过程和函数,但不能看到 UDT。

I've been struggling to figure out what I'm missing and any suggestions would be appreciate.我一直在努力弄清楚我缺少什么,任何建议将不胜感激。

Friend, this is possible yes but you must make the connection in Server Explorer using Oracle's 'Unmanaged Driver'.朋友,这是可能的,但是您必须使用 Oracle 的“非托管驱动程序”在服务器资源管理器中建立连接。 With it the UDT will appear and when clicking with the right button will appear the option to generate C # class.有了它,UDT 就会出现,当点击右键时,会出现生成 C# 类的选项。 Attention: this does not appear with Oracle's 'Managed Driver'.注意:这不会出现在 Oracle 的“托管驱动程序”中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 C#中如何判断一个属性是否为自定义类型? - How do I determine if a property is a user-defined type in C#? C#中的Visual Studio用户定义属性表宏 - Visual Studio user-defined property sheet macros in C# C#:将用户定义的类型传递给Oracle存储过程 - C#: Pass a user-defined type to a Oracle stored procedure C# 用户定义类型为 class 的字段的属性 - C# property for fields with user-defined class type 如何在PowerShell中的用户定义类中使用用户定义的结构? - How Do I Use a User-Defined Struct in a User-Defined Class in PowerShell? 从C#将用户定义类型的值作为输入参数传递给Oracle中的存储过程 - Pass value of user-defined type as input parameter to stored procedure in Oracle from C# EF Core:从 C# 类创建 SQL 用户定义类型 - EF Core: Create a SQL user-defined type from a C# class 如何在Visual Studio中安装C#类库? - How do I install a C# class library in Visual Studio? 在 C# 中,如何在编译时不知道类型的情况下访问用户定义类型的 static 属性? - In C#, how can you access a static property of a user-defined type without knowing the type at compiletime? C#auto生成SQL“用户自定义表类型” - C# auto generate SQL “user-defined table type”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM