实体框架和SQL Server同义词 [英] Entity Framework and SQL Server Synonyms
本文介绍了实体框架和SQL Server同义词的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
看到这篇文章 - 显然你可以做到一些手工操作的edmx。
虽然不优雅,但它并没有回答您的问题:-)
Hasty research tells me that even EF4 still doesn't support SQL Server synonyms. What are my options for setting up a synonym based entity set as if it were a table based entity set? The crudest I have come up with is to copy the underlying table for the synonym, add it to my model, and then rename the entity set in the store model. Is there no more elegant workaround using the POCO or code-first approach?
解决方案
See this post - apparently you can do it with some manual manipulation of the edmx.
Making an Entity Framework Model span multiple databases
It's not elegant, though, so it doesn't answer your question :-)
这篇关于实体框架和SQL Server同义词的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文