How to change the schema via connection string when connecting to Oracle using Entity Framework? How to change the schema via connection string when connecting to Oracle using Entity Framework? oracle oracle

How to change the schema via connection string when connecting to Oracle using Entity Framework?


I just had to edit the EDMX and remove the Schema from every EntitySet

<EntitySet     Name="TableName"    EntityType="Model.Store.TableName"    store:Type="Tables" />

Now it connects to the default schema for a given user.


If the code first method is an option you can override the OnModelCreating method in your DbContext class. In the OnModelCreating method you can put logic in to detect oracle and rename the schema accordingly. The code first approach has been asked about here.