I have two databases with same Tables/Functions/Procedures etc. When I use same schema name in both databases then the EDMX does fine (Same EDMX can be used for both database by changing the connection string).
But, when the schema name (username in case of oracle 10g) is different then it gives me the compilation error.
Is there any way to use same EDMX file with different schema names? I wanted to use same database with two different schemas for two users so that both users can add/edit data only in their schema space.
Any help will be greatly appreciated.
Using same EDMX file for different schema
You should remove Schema attribute from your .edmx file (use XML Editor to edit it).
Also, you'll have to remove the schema name from DefiningQueries and CommandTexts, if you have any in your model.
After performing these actions you should be able to switch between the contexts
simply creating a new instance of the context with proper connection from your configuration file.
Also, you'll have to remove the schema name from DefiningQueries and CommandTexts, if you have any in your model.
After performing these actions you should be able to switch between the contexts
simply creating a new instance of the context with proper connection from your configuration file.
-
- Posts: 4
- Joined: Mon 06 Jul 2009 10:33
What will happen when we update schema again?
Thanks for your suggestion.
But, the problem is whenever I take an update of the EDMX from database then the EDMX will be regenerated and hence the schema information comes again. So, again I will not be able to switch between users.
Is there any permanent solution?
But, the problem is whenever I take an update of the EDMX from database then the EDMX will be regenerated and hence the schema information comes again. So, again I will not be able to switch between users.
Is there any permanent solution?