比較 COM+ 與 ServiceModel 的交易

這個主題會討論如何使用 System.ServiceModel 命名空間提供的 Windows Communication Foundation (WCF) 屬性,來模擬交易 COM+ 服務的行為。

使用 ServiceModel 屬性模擬 COM+

下列表格會比較用來建立 EnterpriseServices 交易的 TransactionOption 列舉,以及如何與 System.ServiceModel 命名空間提供的 WCF 屬性產生關聯。

COM+ 屬性 WCF 屬性

RequiresNew

TransactionFlowAttribute 設定為 NotAllowed

TransactionScopeRequiredtrue

繫結項目中的 TransactionFlow 屬性為 false

必要項

TransactionFlowAttribute 設定為 Allowed

TransactionScopeRequiredtrue

繫結項目中的 TransactionFlow 屬性為 true

支援項目

沒有直接的對等項目。一般來說,您應該採用對 Required 所指定的行為。

NotSupported

TransactionScopeRequiredfalse

繫結項目中的 TransactionFlow 屬性為 false

已停用

沒有直接的對等項目。一般來說,您應該採用對 NotSupported 所指定的行為。