I am trying to create a Model, by using scaffold:
dotnet ef dbcontext scaffold "DataSource=database.sqlite" Microsoft.EntityFrameworkCore.Sqlite -o Model
But this return error:
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'.
I don't understund where error in my PoolInDepertaments table. Please, check my database: https://pastebin.com/Mmi6fnrV
And diagram for this DB: