本主题讨论如何使用 System.ServiceModel 命名空间提供的 Windows Communication Foundation (WCF) 属性来模拟事务性 COM+ 服务的行为。
使用 ServiceModel 属性模拟 COM+
下表比较用于创建 EnterpriseServices 事务的 TransactionOption 枚举,以及他们如何与 System.ServiceModel 提供的 WCF 属性关联。
COM+ 属性 | WCF 属性 |
---|---|
RequiresNew |
TransactionFlowAttribute 设置为 NotAllowed。 TransactionScopeRequired 为 true。 绑定元素中的 TransactionFlow 属性为 false。 |
Required |
TransactionFlowAttribute 设置为 Allowed。 TransactionScopeRequired 为 true。 绑定元素中的 TransactionFlow 属性为 true。 |
Supported |
没有直接等效项。通常,您应采用为 Required 指定的行为。 |
NotSupported |
TransactionScopeRequired 为 false。 绑定元素中的 TransactionFlow 属性为 false。 |
Disabled |
没有直接等效项。通常,您应采用为 NotSupported 指定的行为。 |