更新时间:2022-06-10 07:57:39
方法1和2希望数据库不存在。如果您手动创建数据库,它们不起作用。如果您需要EF在现有数据库中创建表,则必须创建自定义数据库初始化程序。
Method 1 and 2 expects that database doesn't exist yet. They don't work if you create database manually. If you need EF to create tables in existing database you must create custom database initializer.