<p>I have used the Entity Framework to start a fairly simple sample project. In the project, I have created a new Entity Data Model from a SQL Server 2000 database. I am able to query the data using LINQ to Entities and display values on the screen.</p>

<p>I have an Oracle database with an extremely similar schema (I am trying to be exact but I do not know all the details of Oracle). I would like my project to be able to run on both the SQL Server and Oracle data stores with minimal effort. I was hoping that I could simply change the configuration string of my Entity Data Model and the Entity Framework would take care of the rest. However, it appears that will not work at seamlessly as I thought.</p>

<p>Has anyone done what I am trying to do? Again, I am trying to write an application that can query (and update) data from a SQL Server or Oracle database with minimal effort using the Entity Framework. The secondary goal is to not have to re-compile the application when switching back and forth between data stores. If I have to "Update Model from Database" that might be ok because I wouldn't have to recompile, but I'd prefer not to have to go this route. Does anyone know of any steps that might be necessary?</p>

[{'answer_id': 78722, 'author': 'Min', 'author_id': 14461, 'author_profile': 'https://Stackoverflow.com/users/14461', 'pm_score': 1, 'selected': False, 'text': '<p><a href="http://blogs.msdn.com/jkowalski/archive/2008/09/09/persistence-ignorance-poco-adapter-for-entity-framework-v1.aspx" rel="nofollow noreferrer">http://blogs.msdn.com/jkowalski/archive/2008/09/09/persistence-ignorance-poco-adapter-for-entity-framework-v1.aspx</a></p>\n\n<p>The main problem is that the entity framework was not designed with persistence ignorance in mind. I would honestly look at using something other than entity framework.</p>\n'}, {'answer_id': 82947, 'author': 'Arno', 'author_id': 13685, 'author_profile': 'https://Stackoverflow.com/users/13685', 'pm_score': 3, 'selected': True, 'text': '<p>What is generally understood under the term "Persistence Ignorance" is that your entity classes are not being flooded with framework dependencies (important for N-tier scenarios). This is not the case right now, as entity classes must implement certain EF interfaces ("IPOCO"), as opposed to plain old CLR objects. As another poster has mentioned, there is a solution called <a href="http://blogs.msdn.com/jkowalski/archive/2008/09/09/persistence-ignorance-poco-adapter-for-entity-framework-v1.aspx" rel="nofollow noreferrer">Persistence Ignorance (POCO) Adapter for Entity Framework V1</a> for that, and EF V2 will support POCO out of the box.</p>\n\n<p>But I think what you really had in mind was database independence. With one big configuration XML that includes storage model, conceptual model and the mapping between those two from which a typed ObjectContext will be generated at designtime, I also find it hard to image how to transparently support two databases.</p>\n\n<p>What probably looks more promising is applying a database-independent ADO.NET provider like the one from <a href="http://www.datadirect.com" rel="nofollow noreferrer">DataDirect</a>. DataDirect has also announced EF support for Q3/2008.</p>\n'}]
['https://Stackoverflow.com/questions/75959', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1300/']