My first time working on a project solo, and first time attempting to scaffold models from an existing DB. Please see attached pictures for the error.
Scaffold-DbContext "Server=.\SAPAS_LOCAL_TEST;Database=SAPAS_TEST;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models
Build started... Build succeeded.
The key {'YearId'} cannot be added to keyless type 'TlkupYear'.
See the screenshot below:
I've noticed that in the DB this table has no keys, only values... Any way to work around this issue?
Let me know how I can work around this.