Page 1 of 2

MSSQL + Oracle

Posted: Wed 28 Jan 2009 00:06
by estern
Does anyone have a good strategy for creating one entity framework that supports customers on Oracle or MS SQL?

Thanks

Posted: Wed 28 Jan 2009 15:35
by AndreyR
You can refer to our EFQuerySamples. They are available here:
http://devart.com/dotconnect/efquerysamples.zip
These samples use the same CSDL and MSL and differ only in the SSDL part of .edmx file. You can design your model in similar way,
having identical CSDL and MSL layers and the provider-specific SSDL layer.

Posted: Mon 23 Mar 2009 09:47
by _andreas
How do you solved the problem of uppercase table and column names in oralce?
This problem drives me to distraction.

Posted: Mon 23 Mar 2009 12:44
by AndreyR
Try Entity Developer 2.0 Beta. It can work with Entity Framework models and has Naming Rules for setting the needed case.

Posted: Tue 24 Mar 2009 13:23
by robymes
you can also use a strategy with only one csdl (obviously) and msl+ssdl for sqlserver and oracle (5 files).

Posted: Mon 20 Apr 2009 09:09
by fcorreia
These CSDL, MSL and SSDL, you generate them with Entity Developer from Devart?

Any sugestion for the source database from where you generate your .cs? Asking this because of different mapping of types in Oracle and SQLServer.

In any way (futurely) will you make it possible to change the model from Oracle to SQL Server without have to make a new model based on SQL Server? Like, I change the connection and the model "refresh". Off course we map the same tables in both sql server and oracle.

Posted: Wed 22 Apr 2009 13:53
by AndreyR
Thank you for the suggestion, we will investigate the possibility of adding such functionality.

Can we store SSLDs as 'embedded resource'

Posted: Fri 09 Oct 2009 21:06
by slaxman
The samples save these SSDLs in the 'Schemas\ folder. Is it possible to keep them as 'Embedded Resources' instead?

Posted: Mon 12 Oct 2009 10:26
by AndreyR
Sure you can.
But please don't forget to change the connection strings accordingly.

exception while using Embedded Resource

Posted: Mon 12 Oct 2009 20:39
by slaxman
when I do that I get an exception.

EXCEPTION (System.Data.MetadataException): Unable to load the specified metadata resource

Posted: Wed 14 Oct 2009 12:20
by AndreyR
Please change the entity connection string to point on the generated resources, like this:

Code: Select all

metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=Devart.Data.Oracle;provider connection string=...
and check that the names of the resources embedded into your assembly coincide with the names
you have written in your connection string.

overriding the SSDL

Posted: Wed 14 Oct 2009 13:24
by slaxman
this works fine. But the error shows up when I override the SSDL with a diff. name. For example...

metadata=res://*/Model1.csdl|res://*/Model2.ssdl|res://*/Model1.msl;provider=Devart.Data.Oracle;provider connection string=...

however, if I use it as a file instead of embedded resource it works. For example...

metadata=res://*/Model1.csdl|Model2.ssdl|res://*/Model1.msl;provider=Devart.Data.Oracle;provider connection string=...

Posted: Thu 15 Oct 2009 08:57
by AndreyR
Please note that Entity Framework may generate a resource with a name that differs from the model name.
To check the name generated, simply view the generated assembly using any tool that enables resource
viewing, for example .NET Reflector.
Also please check that the Build Action for the Model2.ssdl file is set to Embedded Resource.

entity name has the assembly ns too

Posted: Mon 19 Oct 2009 13:30
by slaxman
you are right. visual studio added the assembly namespace also. Is there a way to tell VS not to do that? btw, it does not do that for the components within the EDMX file. I am guessing that's because of the 'EntityDeploy' custom action.

Posted: Tue 20 Oct 2009 08:56
by AndreyR
I am not aware of any way to overcome this situation.