WCF from theory to Practice (13): Business Polling

Source: Internet
Author: User

Through WCF from theory to practice: the study of transactions, we understand the WCF implementation of the transaction of some basic knowledge, but the transaction in WCF is not so simple, we lack one of the most important function: The business vote, the so-called business vote is a flexible control of the way the transaction is committed, In the above we set the TransactionAutoComplete of the service method to be true, which means that the method automatically votes in favour without exception, but sometimes we want the transaction to be committed only when a certain data satisfies a specific condition in the operation. So the above realization is obviously not satisfied with the demand, at this time we can use OperationContext.Current.SetTransactionComplete (), the display of voting. Note that WCF transactions must be submitted when the unanimous vote is passed. This article is a combination of the bank's example to demonstrate a business vote, and with a beautiful WPF client, can be bought one to get one off,:).

The purpose of this article

Learn more about WCF transactions

By the way, experience the WPF

This article is suitable for readers

This article is suitable for WCF intermediate users, at least need to understand the basic knowledge of the transaction and simple implementation, beginners can first read WCF from theory to practice: business

Learn more about WCF transactions

In this article, we want to simulate the real situation as follows, the establishment of an alliance banking service self-service system, which provides the function of free transfer between banks, according to the practice, the system is divided into four levels, respectively, as follows:

Level Project
Service contract Jillzhang.Wcf.Transactions.Contracts
Service side Jillzhang.Wcf.Transactions
Host Program Jillzhang.wcf.transactions.icbc-used to simulate ICBC

Jillzhang.wcf.transactions.ccb-used to simulate CCB

Client jillzhang.wcf.bankclient– includes a nice WPF form

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.