Accepted Answer

ZZZ_tmp
1
9/26/2018 7:08:12 AM

Popular Answer

There isn't a "out of the box" answer. Make your own Id value assigner if you wish to do it. The preferable option would be to override the SaveChanges function after using the EF code first. If it's your entity with an Added state, you may verify the entity's type and state there before checking its ID. If it is 0, you must get the largest ID possible from the database and increase it. Additionally, you must manually assign duplicate ID checks.



Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow