If all I'm doing is adding new items to the DB, will SaveChanges() ever return less than the number that was added?
For example, if I add 5 new items, could it return a value of 3 in some error conditions?
Basically, I want to be sure that simply catching any exceptions is enough error checking. And if not, what is the best way to check which items failed to be added.
Here is an example (Assume some Person class that we user for our POCOs):
db = new Database();
db.People.Add(p1);
db.People.Add(p2);
db.People.Add(p3);
db.People.Add(p4);
db.People.Add(p5);
db.SaveChanges(); //Will this only return 0, 5, or throw an exception or can it return 3???