I want to loop through a collection of objects and add them all to a table. The destination table has an auto-increment field. If I add a single object there is no problem
I'm using EF6, to set the StoreGeneratedPattern, you can also try open EDMX file in Visual Studio, right click on the Data Column in table and select Properties,
Then you can set it from None to Identity in Properties Window: