Synonyms for Entity Framework with SQL Server

entity-framework sql-server synonym

Question

My hasty inquiry indicates that SQL Server synonyms are still not supported by even EF4. What choices do I have for establishing a synonym-based entity set such that it behaves like a table-based entity set? The most rudimentary solution I've thought of is to duplicate the synonym's underlying table, add it to my model, and then rename the entity set in the store model. Is the POCO or code-first method not a more elegant workaround?

1
9
12/6/2010 6:38:04 PM

Accepted Answer

See this post; it seems that you may do that by manually modifying the edmx.

Using various databases to extend an Entity Framework Model

However, it is not elegant, thus it does not address your query.

4
5/23/2017 10:28:44 AM

Popular Answer

You might develop a view that draws information from your synonym, then include it in your model. giving the synonym's name to the view in your model.



Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow