In SharePoint 2010 you can use LINQ to insert items into a list like this:
using (var context = new DataEntitiesDataContext(http://localhost/))
var item1 = new MyListItem();
item1.Comment = “Item 1”;
var item2 = new MyListItem();
item2.Comment = “Item 1”;
You might be forgiven to ponder whether the above code would support transaction. I know I did! (especially after a user group presenter told me that yes it would).
I tried it out and it doesn’t.
I guess I shouldn’t have even thought about it, since this is being translated to CAML at the end of the day.
It still remains that if you require transaction support, then SharePoint is not for you :D.
One interesting thing I picked up during testing is that the code correctly raised exceptions on column validation errors and unique constraints – but did not fail on required fields. It happily inserted the item into the list with the required fields missing.