I too had the same issue, for me it was due to a table without a primary key. once I add the primary key to the table it worked. use this script to find the table/s without primary key
select schema_name(tab.schema_id) as [schema_name],
tab.[name] as table_name
from sys.tables tab
left outer join sys.indexes pk
on tab.object_id = pk.object_id
and pk.is_primary_key = 1
where pk.object_id is null
order by schema_name(tab.schema_id),
tab.[name]
I found my solution from this thread https://github.com/dotnet/efcore/issues/29516