Handling duplicate insertion
- by Francis
So I've got this piece of code which, logically should work but Entity Framework is behaving unexpectedly.
Here:
foreach (SomeClass someobject in allObjects)
{
Supplier supplier = new Supplier();
supplier.primary_key = someobject.id;
supplier.name = someobject.displayname;
try
{
sm.Add(supplier);
ro.Created++;
…