Steffen Mangold wrote: > > So you add all the 15 rows inside one transactionscope and with one > context.SaveChanges() call? >
Yes. > > Perhaps it makes a difference if the contains violation is inside the > 15 rows you try to add (row 10 is incompatible with row 2 for example) > The important thing is that there is only one SaveChanges call (which attempts to commit pending changes to the underlying database). > > If it is a contains violation with data already in DB. > My test case does attempt to add rows that conflict with data already present in the sample database. > > For my test I add a single row to the DB just before I doing my > transaction. > I assume that is done in a separate transaction block? Also, did you try adding the manual opening of the connection in the previous message I sent? As follows: using (TransactionScope transaction = new TransactionScope()) { context.Connection.Open(); // try adding this line. -- Joe Mistachkin _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users