efcore icon indicating copy to clipboard operation
efcore copied to clipboard

Adding entities using AddRange method does not refresh entity ID

Open laksh-parab opened this issue 9 years ago • 1 comments

looks like when i add IEnumerable of entities using AddRange method, and then save, then it saves records in the database however it does not refresh entity ID

detail here on so

laksh-parab avatar Mar 31 '17 18:03 laksh-parab

@laksh-parab The code shown in the linked post enumerates the IEnumerable twice, each time creating new Test object instances. This means the objects being saved are not the objects on which you are looking at the IDs.

In other words, these aren't the objects you're looking for.

ajcvickers avatar Apr 01 '17 00:04 ajcvickers