Open phillijw opened 7 years ago
For some reason I am not able to enable identity insert, do the bulk insert, then disable it again. Am I doing something wrong or is this a bug?
db.Database.ExecuteSqlCommand("SET IDENTITY_INSERT [dbo].[Orders] ON"); EFBatchOperation.For(db, db.Orders).InsertAll(olist); db.Database.ExecuteSqlCommand("SET IDENTITY_INSERT [dbo].[Orders] OFF");
This code ignores the value I've set on the model and uses the next available seeded record in the table.
For some reason I am not able to enable identity insert, do the bulk insert, then disable it again. Am I doing something wrong or is this a bug?
This code ignores the value I've set on the model and uses the next available seeded record in the table.