AZ-204 · Question #21
Case Study 4 - Best for You Organics Background Best for You Organics Company is a global restaurant franchise that has multiple locations. The company wants to enhance user experiences and vendor…
The correct answer is A. Implement simple retry by using the EnableRetryOnFailure feature of Entity Framework. Scenario: The Delivery API intermittently throws the following exception: A useful method to get rid of this error is to use RETRY LOGIC of Entity Framework 1.1.0 services.AddDbContext<DbContext>(options => options.UseSqlServer('yourconnectionstring', ...sqlServerOptionsAction…
Question
Options
- AImplement simple retry by using the EnableRetryOnFailure feature of Entity Framework.
- BImplement exponential backoff by using the EnableRetryOnFailure feature of Entity Framework.
- CImplement the Circuit Breaker pattern by using the EnbaleRetryOnFailure feature of Entity
- DInvoke accustom execution strategy in Entity Framework.
How the community answered
(33 responses)- A79% (26)
- B3% (1)
- C6% (2)
- D12% (4)
Explanation
Scenario: The Delivery API intermittently throws the following exception: A useful method to get rid of this error is to use RETRY LOGIC of Entity Framework 1.1.0 services.AddDbContext<DbContext>(options => options.UseSqlServer('yourconnectionstring', ...sqlServerOptionsAction: sqlOptions => ......sqlOptions.EnableRetryOnFailure( .........maxRetryCount: 5, .........maxRetryDelay: TimeSpan.FromSeconds(30), .........errorNumbersToAdd: new List<int>() { 19 }); In Retry logic, error 19 is not included. So you have to pass the error code 19 to set retry logic for https://stackoverflow.com/questions/47558062/error-19-physical-connection-error/47559967
Topics
Community Discussion
No community discussion yet for this question.