Auto-add to UpdateOnSubmit when adding/removing records

Jun 23, 2010 at 11:56 PM

Right now, each time I change the records, I have to do

db.UpdateOnSubmit(contacts);
db.Submit();

Why not simply do the UpdateOnSubmit on the add/remove methods?

Also, the FlatRecord can also have a "Save" method so if I make changes to the items, the Save method will enqueue the UpdateOnSubmit so doing a db.Submit() later can take care of everything.

Coordinator
Jul 5, 2010 at 12:33 AM

That's a great suggestion! The first revision was literally thrown together from an idea (out of necessity really), so a lot of "good ideas" went right over my head while I was getting it out the gate.

I've been working on different ways for the data to be saved, and ways to make it easier to use (and more powerful), so this *will* definitely end up making the final cut.

Clint