开发者

add 2 entity from different DB with EF

开发者 https://www.devze.com 2023-01-19 16:57 出处:网络
does a开发者_运维技巧nyone know if is possible to add 2 entities into EF model from 2 DB. If not, what suggestions can you gave me to build a query that affects 2 databasesActually, there is no direc

does a开发者_运维技巧nyone know if is possible to add 2 entities into EF model from 2 DB.

If not, what suggestions can you gave me to build a query that affects 2 databases


Actually, there is no direct support for this scenario, MSFT members state it in this thread.
However, Rafael Krisller and Akhil Karkera suggest some workarounds here.


It is not possible to map a conceptual model, to two storage models.

If you find yourself needing to join between 2 databases, I have seen this accomplished via Data Services. You basically talk via URIs. So you query for URI to some set of data (ultimately gives you the surrogate key) and then you use that to query for data in the second database.

0

精彩评论

暂无评论...
验证码 换一张
取 消