How would i go about using the "Model first" approach that would work for both oracle and sql server?
(obviously i would like to create only one model that works for both)
Could i then create both db schemas from this?
thanks
joe
EF Model First and devart for both oracle and sql server
The most straightforward way to achieve the appropriate results is to create a model for SQL Server, and then generate the database script for the Oracle database. After some minor SSDL adjustments there should be two models using the same CSDL and MSL, with the different SSDL layers.
Don't forget to set the correct metadata paths in the connection strings.
Take a look at this post concerning the work with MSSQL and Oracle, for example.
Don't forget to set the correct metadata paths in the connection strings.
Take a look at this post concerning the work with MSSQL and Oracle, for example.
so far i:
#created a model for sql
#copied the model objects to another model (oraModel) and used the devart .tt to generate a sql script
#edited the ssdl to remove the schema="MyUser"
#fixed the app.config to point to new ssdl
1. The sql script generated contained a schema name prefix on every table that was quoted and therefore not recognised,
1. Is there a way to stop this being quoted?
2. Is there a way to stop this being added in the first place?
3. Is there a better way to create the sql script?
4. Is there a way to stop the schema="MyUser" being added to the ssdl?
3. Why are the table names quoted in oracle? e.g tableA in Sql is "tableA" in Oracle
4. why are the column names quoted in oracle? e.g columnA in Sql is "columnA" in Oracle
#created a model for sql
#copied the model objects to another model (oraModel) and used the devart .tt to generate a sql script
#edited the ssdl to remove the schema="MyUser"
#fixed the app.config to point to new ssdl
1. The sql script generated contained a schema name prefix on every table that was quoted and therefore not recognised,
1. Is there a way to stop this being quoted?
2. Is there a way to stop this being added in the first place?
3. Is there a better way to create the sql script?
4. Is there a way to stop the schema="MyUser" being added to the ssdl?
3. Why are the table names quoted in oracle? e.g tableA in Sql is "tableA" in Oracle
4. why are the column names quoted in oracle? e.g columnA in Sql is "columnA" in Oracle
Go to the %Program Files%\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft\Entity Framework Tools\Templates\Includes\Devart SSDLToSQL.ttinclude file.
It contains the Quote method.
You can adjust the generation of the schema name, and schema name and column quoting by modifying this method.
It contains the Quote method.
You can adjust the generation of the schema name, and schema name and column quoting by modifying this method.
having everything quoted looks odd, can you explain why you decided to quote table names, column names etc?
How hard would it be to undo this?
if I remove the quotes in the script surely there is another file that pre-defines the quotes that are created during the construction of the queries that i would need to modify?
Thanks
Joe
How hard would it be to undo this?
if I remove the quotes in the script surely there is another file that pre-defines the quotes that are created during the construction of the queries that i would need to modify?
Thanks
Joe