{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/EntityFramework/issues/5067","repository_url":"https://api.github.com/repos/aspnet/EntityFramework","labels_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/5067/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/5067/comments","events_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/5067/events","html_url":"https://github.com/aspnet/EntityFramework/issues/5067","id":148307882,"number":5067,"title":"Insertion Order RC1","user":{"login":"deenairn","id":3931242,"avatar_url":"https://avatars.githubusercontent.com/u/3931242?v=3","gravatar_id":"","url":"https://api.github.com/users/deenairn","html_url":"https://github.com/deenairn","followers_url":"https://api.github.com/users/deenairn/followers","following_url":"https://api.github.com/users/deenairn/following{/other_user}","gists_url":"https://api.github.com/users/deenairn/gists{/gist_id}","starred_url":"https://api.github.com/users/deenairn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deenairn/subscriptions","organizations_url":"https://api.github.com/users/deenairn/orgs","repos_url":"https://api.github.com/users/deenairn/repos","events_url":"https://api.github.com/users/deenairn/events{/privacy}","received_events_url":"https://api.github.com/users/deenairn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-14T09:49:02Z","updated_at":"2016-04-14T17:22:37Z","closed_at":null,"body":"Adding things to a context via AddRange does not add entities to the DB in the anticipated order, i.e. with the lowest IDs corresponding to the earliest items added to the DbContext where the identity column is set to IDENTITY(1,1). Is the allocation of generated IDs entirely non-deterministic?"},"comment":{"url":"https://api.github.com/repos/aspnet/EntityFramework/issues/comments/210060043","html_url":"https://github.com/aspnet/EntityFramework/issues/5067#issuecomment-210060043","issue_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/5067","id":210060043,"user":{"login":"gdoron","id":6141009,"avatar_url":"https://avatars.githubusercontent.com/u/6141009?v=3","gravatar_id":"","url":"https://api.github.com/users/gdoron","html_url":"https://github.com/gdoron","followers_url":"https://api.github.com/users/gdoron/followers","following_url":"https://api.github.com/users/gdoron/following{/other_user}","gists_url":"https://api.github.com/users/gdoron/gists{/gist_id}","starred_url":"https://api.github.com/users/gdoron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdoron/subscriptions","organizations_url":"https://api.github.com/users/gdoron/orgs","repos_url":"https://api.github.com/users/gdoron/repos","events_url":"https://api.github.com/users/gdoron/events{/privacy}","received_events_url":"https://api.github.com/users/gdoron/received_events","type":"User","site_admin":false},"created_at":"2016-04-14T17:22:37Z","updated_at":"2016-04-14T17:22:37Z","body":"Interesting, I didn't notice it, are all the inserted entities of the same type/table?\r\nHow many entities do you insert via `AddRange`? what is your max batch size?\r\n\r\nBTW, since IDENTITY is surrogate key, do you really care about the ordering?"}}