What is good C# coding style for catching SQLException and retrying

后端 未结 8 692
慢半拍i
慢半拍i 2020-12-05 02:55

I have a method that calls a SQLServer function to perform a free text search against a table. That function will occasionally on the first call result in a SQLException: \"

8条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-05 03:33

    I think annotating a method with an aspect specifying the retry count would result in more structured code, although it needs some infrastructure coding.

提交回复
热议问题