Entity Framework : Sharing entities across different DbContexts
问题 I'm developing a plugin application with EF6, code first. I have one main context with an entity called User : public class MainDataContext : DbContext { public MainDataContext(): base("MainDataContextCS") {} public DbSet<User> Users { get; set; } } And then another context for PluginX, on another project which references the base one: public class PluginDataContext : DbContext { public PluginDataContext () : base("MainDataContextCS") { } protected override void OnModelCreating(DbModelBuilder