Targeting multiple databases using one Entity Model (.edmx)
Posted: Mon 30 Jun 2014 12:49
Hi!
We have created an .NET Framework 4.0 entity data model (.edmx) from Oracle Database. Is it possible to use Entity Developer to generate, for example, MS SQL Server mappings and other needed files to use same model without changing any LINQ queries in our software? So target database would simply be selected by changing connection string in App.config.
I was playing around with Pro trial and I was able to create .csdl, .msl and .ssdl files for the database but do I need all of them?
My current Oracle connection string is like this:
So MSSQL connection string should be something like this, right?:
Btw. If .edmx has been modified inside Visual Studio (like names of the properties and tables changed from UPPER case to "First letter uppercase" like TableName or PropertyName, should Entity Developer use these same tablenames and property names when targeting some other database? It seemed that I didn't get same results but everything was uppercase even though I tried to change settings...
Br,
Kalle
We have created an .NET Framework 4.0 entity data model (.edmx) from Oracle Database. Is it possible to use Entity Developer to generate, for example, MS SQL Server mappings and other needed files to use same model without changing any LINQ queries in our software? So target database would simply be selected by changing connection string in App.config.
I was playing around with Pro trial and I was able to create .csdl, .msl and .ssdl files for the database but do I need all of them?
My current Oracle connection string is like this:
Code: Select all
connectionString="metadata=res://*/DashboardModel.csdl|res://*/DashboardModel.ssdl|res://*/DashboardModel.msl;provider=Oracle.DataAccess.Client;provider connection string="data source=DB:1521/SCHEMA;password=PASSWORD;persist security info=True;user id=USER""Code: Select all
connectionString="metadata=DashboardModel.MSSQL.ssdl|DashboardModel.MSSQL.csdl|DashboardModel.MSSQL.msl;provider=System.Data.SqlClient;provider connection string="Data Source=.\SQLEXPRESS;Initial Catalog=CATALOG;password=PASSWORD;user id=USER;Integrated Security=SSPI""Br,
Kalle