Wednesday, July 13, 2022

Nuget PMC Error while adding migration: The entity type 'Employee' requires a primary key to be defined. If you intended to use a keyless entity type, call 'HasNoKey' in 'OnModelCreating'. For more information on keyless entity types, see https://go.microsoft.com/fwlink/?linkid=2141943.

 This happens when you dont define primary key for an entity type. 


Define a primary key either explicitly or implicitly. 

No comments:

Post a Comment

How to check local and global angular versions

 Use the command ng version (or ng v ) to find the version of Angular CLI in the current folder. Run it outside of the Angular project, to f...