Entity Framework : Sharing entities across different DbContexts

后端 未结 4 1551
后悔当初
后悔当初 2020-12-30 07:12

I\'m developing a plugin application with EF6, code first.

I have one main context with an entity called User:

public class MainDataCont         


        
4条回答
  •  不知归路
    2020-12-30 07:59

    You can try using views, declare the user as a view in PluginDataContext and when you perform the migration, type the method "create User view as ...", this allows you to relate the book to the user.

提交回复
热议问题