I use linq-sql and this is what I need.
Sub Commit()
Try
StepStart:
Transaction Scope Serialized
Begin Transaction
Check BusinessRule1
Check BusinesRule2
if BusinessRulesFailed
{ Transaction.Rollback }
else {
Query = db.out
db.SubmitChanges()
Transaction.Commit()
}
Catch DeadLockException
Goto StepStart
End Try
End Sub
Is it ok to follow this approach? Can someone give me an example in C# or VB.Net