entity-framework – 如何从实体框架中的自动代码首次迁移中排除一个表?

我在Code First模式下使用Entity Framework并启用了自动迁移.现在,我有一个实体,其表不应由EF管理(迁移).有没有办法禁用一个特定实体(即表)的自动迁移? 最佳答案 可以通过使用另一个DbContext来访问相关表.迁移绑定到一个DbContext(请参阅
Is it possible to have automatic migrations for one DbContext and not for another in the same project?).

点赞