不要Azure存储相关的API参与System.Transactions的? [英] Do Azure storage-related APIs participate in System.Transactions?
问题描述
我找不到任何地方这样的任何信息,但这个问题很简单。
I can't find any information on this anywhere and yet the question is simple.
我可以在的TransactionScope
,使得例如包装与存储相关的操作如果有一个回退,上传的文件回滚也?
Can I wrap storage-related actions in a TransactionScope
such that e.g. if there is a rollback, the uploaded file is rolled back also?
如果本机API不这样做已经是有一个公共的实施地方?
If the native APIs don't do this already, is there a public implementation anywhere?
推荐答案
如果你指的是表或BLOB更新,也没有明确的概念,提交或回滚。当你调用API(直接调用REST或通过PowerShell中/ CLI / SDK是否),它只是对存储一个动作,它会成功或失败(虽然有些动作需要一段时间和呼叫可能完成之前返回)。有没有事务范围包装这个动作。你需要考虑在应用程序层面解开自己的表/斑点的更新服务。
If you're referring to Table or Blob updates, there's no notion of explicit commit or rollback. When you make an API call (whether direct REST call or via PowerShell / CLI / SDK), it's just an action against storage, and it will either succeed or fail (although some actions take a while and the call may return before completion). There's no transaction scope wrapping this action. You'd need to take care of undoing your Table / Blob updates at an app level.
这篇关于不要Azure存储相关的API参与System.Transactions的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!