[{"data":1,"prerenderedAt":145},["ShallowReactive",2],{"tech-article":3},{"id":4,"title":5,"body":6,"date":135,"description":136,"extension":137,"meta":138,"navigation":139,"path":140,"seo":141,"stem":142,"tags":143,"__hash__":144},"tech/tech/csharp-retry-and-transaction.md","【ASP.NET Core】SQL Server接続のリトライとトランザクションの共存",{"type":7,"value":8,"toc":125},"minimark",[9,13,17,28,31,83,86,93,97],[10,11,12],"h2",{"id":12},"はじめに",[14,15,16],"p",{},"ASP.NET CoreアプリケーションでSQL Server接続の断続的な500エラーに対処するため、リトライロジックとトランザクションを共存させる方法を解説しています。",[14,18,19,20,27],{},"本記事の詳細は ",[21,22,26],"a",{"href":23,"rel":24},"https://tech-blog.cloud-config.jp/2024-01-12-csharp-coexistence-retry-and-transaction",[25],"nofollow","cloud-config tech blogの記事"," をご覧ください。",[10,29,30],{"id":30},"技術スタック",[32,33,34,47],"table",{},[35,36,37],"thead",{},[38,39,40,44],"tr",{},[41,42,43],"th",{},"項目",[41,45,46],{},"内容",[48,49,50,59,67,75],"tbody",{},[38,51,52,56],{},[53,54,55],"td",{},"フレームワーク",[53,57,58],{},"ASP.NET Core",[38,60,61,64],{},[53,62,63],{},"ORM",[53,65,66],{},"Entity Framework Core",[38,68,69,72],{},[53,70,71],{},"データベース",[53,73,74],{},"SQL Server",[38,76,77,80],{},[53,78,79],{},"言語",[53,81,82],{},"C#",[10,84,85],{"id":85},"概要",[14,87,88,92],{},[89,90,91],"code",{},"EnableRetryOnFailure","によるリトライ設定と、既存のトランザクション処理を組み合わせると、EF Coreが「ユーザー起因のトランザクションはサポートされない」というエラーを発生させます。",[94,95,96],"h3",{"id":96},"ポイント",[98,99,100,107,113,119],"ul",{},[101,102,103,106],"li",{},[104,105,91],"strong",{},": 接続リトライの回数や遅延を設定可能な自動リトライ機構",[101,108,109,112],{},[104,110,111],{},"ExecutionStrategy",": EF Coreのトランザクション操作をリトライ可能にする仕組み",[101,114,115,118],{},[104,116,117],{},"CreateExecutionStrategy()",": トランザクション内でリトライロジックを正しくラップする解決策",[101,120,121,124],{},[104,122,123],{},"汎用リポジトリパターン",": リトライ＋トランザクションロジックをカプセル化する実装アプローチ",{"title":126,"searchDepth":127,"depth":127,"links":128},"",2,[129,130,131],{"id":12,"depth":127,"text":12},{"id":30,"depth":127,"text":30},{"id":85,"depth":127,"text":85,"children":132},[133],{"id":96,"depth":134,"text":96},3,"2024-01-12","EF CoreのEnableRetryOnFailureとトランザクションを共存させる実装方法を解説します","md",{},true,"/tech/csharp-retry-and-transaction",{"title":5,"description":136},"tech/csharp-retry-and-transaction",[58,66,74,82],"6W-f1AZm5wWl_aILgxOVYzBIoCIg33WSNQqNSs-uGRw",1774835869775]