问题
I'm looking for a C# code generator which generate C# automatically to access stored procedures on Oracle Database.
For instance, if I have some packages on schema DEV like:
- PACKAGE1 with FUNC1, FUN2
- PACKAGE2 with FUNC3, FUN4
The generator creates code to run from C# the following code:
int a = PACKAGE1.FUNC1(12, 34, "hello");
Any clue?
回答1:
MyGeneration is open source, is template driven, and the templates can be written in C#. So would meet your needs, or there might even by a template out their already.
回答2:
CodeFluent Entities is model-first tool that can be used to generate SQL Scripts for Oracle:
- Schema
- Tables
- Constraints (primary and foreign keys)
- Views
- Procedures (and associated Oracle Packages)
- Instances (data)
Application classes (C#) may also be generated with relative ease.
回答3:
I have something close to what you want... it currently generates stored procedure wrappers for Python. It's an open source package and you can fill in the template with the C# code you desire.
http://markharrison.net/orapig/
http://code.google.com/p/orapig/
I'd be happy to assist in getting this going. My email address is in my profile if you want to discuss further.
回答4:
- CodeSmith Generator - commercial software
- MyGeneration - free
- Metadrone - free
See also 1 and 2.
来源:https://stackoverflow.com/questions/785544/any-good-c-sharp-code-generator-for-using-oracle-stored-procedures