How to get EntityFramework to add rows in order?

In my SQL Server database, I use the auto-increment field for Id. Whenever I add new rows to this table with the SQL Server entity, I want these identifiers to maintain the order in which these rows were added in the Entity Framework, but for some reason they are random.

+5
source share
1 answer

Call SaveChanges()after each AddObject. This is the only way to control the order.

+3
source

All Articles