I want to make additions to a database, in this case massive amounts of information, with no transactions on my LINQ To SQL model. Does anyone know how to turn off LINQ To SQL transactions on a datacontext or on the submit changes operation?
Share
As far as I can tell, there is no way to disable transactions on insert without changing the recovery mode of the database from full to to simple.
Be careful though, since you can only recover a database with a simple recovery mode to the latest backup and won’t be able to apply the transaction logs from transactions that occurred since that backup was performed.
If you can configure a batch size (I know you can with NHibernate, not positive about LINQ to SQL) to something like 100 or more, that can also reduce the round trips to the database which will also increase insert performance.