How do I ensure and enforce that all write operations to my MS SQL Server DB are transactions-based?
The reason I want to do this is that the DB contains financial account data and operations that fail halfway through some set of changes should not be able to mess up the database by mistake or by crashing.
The application is written in ASP.NET C#.
Thanks.
Edit:
There is a DAL but it does not (yet) require transactions for changes.
We wrote the DAL ourselves. We did not use ORM.
I know how to perform one transaction from ASP.NET.
I want to ensure that all changes are made in transaction form so that if the application throws some exception in the middle, there will be no change to the database.
You might want to look at setting SQL Server to use implicit transactions: http://msdn.microsoft.com/en-us/library/ms188317.aspx