entity-framework-core-mock icon indicating copy to clipboard operation
entity-framework-core-mock copied to clipboard

Fix generated key when initial entities have ids

Open Kaffeetasse opened this issue 2 years ago • 0 comments

I have encountered an Issue, when an int or long key property is used and the MockDbSet has initial Entities with predefined key values.

This PR also includes a test for this case.

My idea was if a new Entity with a Key is added to set the KeyContext Identity value to the provided Key if it is larger than the current one.

Kaffeetasse avatar Oct 14 '23 00:10 Kaffeetasse