How to add RetryPolicy for Asp.Net Core app using Linq2Db context #4140
-
I saw that there is a possibility to add retry policy for queries. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
We recommend to add it to context configuration using options.UseRetryPolicy(policyImplementation) see all configuration methods here: https://github.com/linq2db/linq2db/blob/master/Source/LinqToDB/Extensions/DataOptionsExtensions.cs#L950-L1090 but you can also set it application-wide: Configuration.RetryPolicy.Factory = ... and other Configuration.RetryPolicy.* properties https://github.com/linq2db/linq2db/blob/master/Source/LinqToDB/Common/Configuration.cs#L470-L565 |
Beta Was this translation helpful? Give feedback.
We recommend to add it to context configuration using
see all configuration methods here: https://github.com/linq2db/linq2db/blob/master/Source/LinqToDB/Extensions/DataOptionsExtensions.cs#L950-L1090
but you can also set it application-wide:
and other Configuration.RetryPolicy.* properties https://github.com/linq2db/linq2db/blob/master/Source/LinqToDB/Common/Configuration.cs#L470-L565