Created
October 28, 2024 20:09
-
-
Save javierguerrero/acfe1eae3bfa701b66d4d96de1813b1d to your computer and use it in GitHub Desktop.
exception_handling_csharp_chapter5_7.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var circuitBreakerPolicy = Policy | |
.Handle<SqlException>() | |
.CircuitBreaker(2, TimeSpan.FromMinutes(1)); | |
circuitBreakerPolicy.Execute(() => AccesoBaseDeDatos()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment