实体框架6 SqlAzureExecutionStrategy重试时记录 [英] Log when entity framework 6 SqlAzureExecutionStrategy retries
问题描述
当SqlAzureExecutionStrategy重试实体框架操作时,如何记录日志?当将瞬态故障处理逻辑与常规SqlConnection调用一起使用时,将显示Retrying事件.在实体框架6中使用SqlAzureExecutionStrategy时是否有类似的东西?如果没有,还有什么其他选择?
该主题上有一篇很好的文章,解释了使用ASP.NET MVC和EntityFramework记录Azure SQL数据库的所有步骤:希望这可以帮助.这是它的链接:asp.net/mvc/overview/getting-started/…–昨天的ACS
如 ACS 在评论中所述,此指南讨论了Entity Framework的连接弹性和命令拦截.本文讨论了如何在EF6中构建重试逻辑以及如何创建日志记录接口和类来记录事件. >
除了上一个链接之外,还有一个主题讨论了连接弹性/retry逻辑及其EF 限制.
希望这会有所帮助!
How can I log when the SqlAzureExecutionStrategy retries an Entity Framework operation? When using the transient fault handling logic with regular SqlConnection calls, a Retrying event is exposed. Is there something similar when using the SqlAzureExecutionStrategy with Entity Framework 6? If not, what are some other options?
There is a very good article on this topic explaining all the steps for logging Azure SQL database with ASP.NET MVC and EntityFramework:. Hope this helps. Here is the link to it: asp.net/mvc/overview/getting-started/… – ACS yesterday
As stated in the comment by ACS, this guide discusses connection resiliency and command interception for Entity Framework.This document discusses how to built the retry logic in EF6 and how to create a logging interface and class to log the events.
In addition to the previous link, there is a topic which discusses connection resiliency/retry logic in EF6 and its limitations.
Hope this helps!
这篇关于实体框架6 SqlAzureExecutionStrategy重试时记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!