EntityFramework.Docs icon indicating copy to clipboard operation
EntityFramework.Docs copied to clipboard

Failed insert on composite key

Open montwell opened this issue 7 years ago • 0 comments

I followed the recommended Fluent API for a composite key, but am receiving a unique constraint error on the second value of the key.

Violation of UNIQUE KEY constraint 'AK_example'. Cannot insert duplicate key in object 'dbo.example_table'. The duplicate key value is (1417821557451)

EDIT: found a data attribute assigning one of the keys as an alternative key.

montwell avatar May 21 '19 17:05 montwell