how can i resolve this error , i use identity 2 and identity create id for user (UserLog is a class that i create , and i want add this table in my DB)
when i use update-database in power shell i get this error
There are no primary or candidate keys in the referenced table 'dbo.AspNetUsers' that match the referencing column list in the foreign key 'FK_dbo.UserLogs_dbo.AspNetUsers_UserId'.
Thanks for your post.
and i want add this table in my DB)
#EF Code first adding new table to database schema without losing data
Hope this can be helpful.
Thanks i dded priamaryKey manually in sql server and it work , but i wanted add by code , anyway thanks for your help