score:1

For #1, There is no way, to work with schemas directly in a Linq-To-Entities query. I believe they are adding some functionality here in EF6, but I'm guessing you don't want to wait until then.

There is one work around, which I have used in SQL Server 2008, using Synonyms (I believe PostgreSQL also has Synonym functionality).

For example, if your table names are dbo.Address and read.Address, you would create a Synonym for read.Address, named read.Address_read, then you would add the Synonym to your EF datamodel, instead of the table itself. This gives you the ability to perform any and all queries against multiple schemas at once, because EF thinks these tables have different names.


Related Articles