Is it valid to do something such as
CREATE SYNONYM [dbo].[MyTable] FOR [AnotherDatabase].dbo.[MyTable]
and then modify Entity Framework\'s edmx
I've found that this trick with synonyms works perfectly with the "Code first" approach without any manipulation with edmx files!
The only thing you have to do, is to "bind" your class to appropriate synonym in the OnModelCreating method of your DataContext.
For example, if I have a synonym to table Personnel in another DB (and the class name is also Personnel), and synonym's name is "myschema.MySynonym" then the OnModelCreating method should looks like:
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
modelBuilder.HasDefaultSchema("myschema");
modelBuilder.Entity()
.ToTable("MySynonym");
Database.SetInitializer(null);
base.OnModelCreating(modelBuilder);
}