You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+38-13Lines changed: 38 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,9 +63,34 @@ using SqlAppLockHelper.SystemDataNS;
63
63
Usage is very simple by using custom extensions of the SqlConnection or SqlTransaction. The following example shows
64
64
the recommended usage of Transaction Scope by calling `.AcquireAppLockAsync(...)` on the SqlTransaction instance:
65
65
66
-
*NOTE:* Async is recommended, but the sync implementation works exactly the same -- sans async/await.
66
+
*NOTES:*
67
+
- Async is recommended, but the sync implementation works exactly the same -- sans async/await.
68
+
- Default behavior is to throw a `SqlServerAppLockAcquisitionException` when lock acquisition fails but this can be controlled via `throwsException` parameter.
67
69
68
-
#### Using Sql Transaction (Transaction Scope will be used):
70
+
#### Using Sql Transaction (Transaction Scope will be used) - Default behavior will throw an Exception:
71
+
```csharp
72
+
//Attempt Acquisition of Lock and Handle Exception if Lock cannot be acquired...
0 commit comments