【发布时间】:2018-11-22 00:01:48
【问题描述】:
我正在尝试使用脚手架创建模型:
dotnet ef dbcontext scaffold "DataSource=database.sqlite" Microsoft.EntityFrameworkCore.Sqlite -o Model
但是这个返回错误:
Could not scaffold the foreign key 'PoolsInDepartments(pools_id)'. A key for 'id' was not found in the principal entity type 'Pools'.
Could not scaffold the foreign key 'PoolsInDepartments(departaments_id)'. A key for 'id' was not found in the principal entity type 'Departments'.
我不明白 PoolInDepertaments 表中的错误在哪里。请检查我的数据库: https://pastebin.com/Mmi6fnrV
这个数据库的图表:
【问题讨论】:
-
我正在上传sqlite3文件sendspace.com/file/hwixx7