Search found 2 matches

by vladk
Tue 14 Sep 2010 15:27
Forum: Entity Framework support
Topic: Using EF and devart for both oracle and sql server?
Replies: 12
Views: 5373

AndreyR wrote:Yes, you can change the Metadata Artifact Processing to EmbedInOutputAssembly.
But don't forget to change connection string accordingly (they should start with res://*/ and contain the name of the generated resource).
Yes , I do this in this way. I explain this in more details:
I have Model1.edmx file that is generated for SQL and embedded into assembly using standard EntityDeploy build action.
I extract ssdl and convert it into Model1Ora.ssdl. Model1.edmx remains embedded as it was by default.
Here are 2 scenarios I do:
1) I copy Model1Ora.ssdl into /bin folder and reference it like this:
metadata=res://*/Model1.csdl|~\bin\Model1Ora.ssdl|res://*/Model1.msl
Everything works fine! :)
2) I embed Model1Ora.ssdl using "Embedded resourse" build action and use this:
metadata=res://*/Model1.csdl|res://*/Model1Ora.ssdl|res://*/Model1.msl
In this case Model1Ora.ssdl cannot be found. :(

If I create 2 edmx files (one for SQL and one for Oracle) then it works with the metadata from scenario #2, but I would like to avoid keeping unnecessary data.

So I suspect that EntityDeploy build action adds Model1Ora.ssdl in some special way and it's not enough just to embed this ssdl file as a plain resource into an assembly.

That is why I'm asking DevArt - maybe you have had some experience in this and have implemented #2 successfully, haven't you?

I use VS2008, .NET 3.5
by vladk
Fri 10 Sep 2010 15:18
Forum: Entity Framework support
Topic: Using EF and devart for both oracle and sql server?
Replies: 12
Views: 5373

AndreyR wrote: One note: don't forget to change the MetadataArtifactProcessing property of the model to CopyToOutptutDirectory.
Your test example shows a solution with extra ssdl files copied to output directory. This seems to be not so convenient for web apps.
Is it possible to embed this second ssdl file into assembly resources? I tried to do this using 'Embedded resources' option of file properties but it does not work.