I am using .NET core 6. I want t insert data in SQL server without a PK. I have used "KeyLess" and "HasNoKey()". But when i am trying to insert data into DB it is showing me error. Can anyone please tell how to insert without PK?
Error:
"unable to track an instance of type 'entityModel' because it does not have a primary key. only entity types with a primary key may be tracked.'"
KeyLessis used for a different purpose. They can only contain reference navigation properties pointing to regular entities.