Is it possible using nHibernate, or Entity Framework, or whatever, to generate the SQL necessary to INSERT or UPDATE an object I've mapped to a table? I'm looking at generating SQL scripts from these POCO classes instead of running directly against a database.
The idea here is I'm taking some 2000+ line SQL scripts and I've made a Python-based DSL that does a lot of the work for us. I've got a C# application now that loads IronPython and 'compiles' the Python script, generating all of the necessary objects. I've got a prototype script here that's roughly 100 lines. Now, I need to actually generate the SQL script.
I could use something like nVelocity, but if this project is successful, I want to keep the long-term door open for running against a database. I've got roughly 30 tables with a few dozen columns per table to script out.
I found this but it appears to be generating the database table schema, rather than writing inserts and updates: https://forum.hibernate.org/viewtopic.php?f=25&t=1000334
The documentation on SchemaExport doesn't give a lot of information.
Suggestions / ideas?