Entity framework 4 and multiple database

后端 未结 3 1919
悲&欢浪女
悲&欢浪女 2020-12-11 04:27

Something changes or it still not support this? For example join database1.dbo.Users and database2.dbo.Addresses

3条回答
  •  心在旅途
    2020-12-11 04:56

    I actually did find a way to make an EF model span multiple databases if your database supports Synonyms. Basically you setup Synonyms to Database2 on Database1, create separate edmx models for each, then merge the XML

    I posted the exact steps to make an edmx file span multiple databases here if you're interested, along with a script to do the merge for you whenever something changes.

提交回复
热议问题