I have an IEnumerable ORDERS
that I get from reading from an excel file. Then I add each row:
foreach (var item in so)
{
context.ORDERS.AddObject(item);
}
db.SaveChanges();
Sometimes there are duplicates in the source file, and I'm not sure how to not add duplicates to the table.