tailieunhanh - Professional C# 2008 phần 5

OrderByDescending các loại giá trị trong thứ tự giảm dần. ThenBy và các nhà khai thác ThenByDescending được sử dụng cho một loại thứ cấp nếu các loại đầu tiên cho kết quả tương tự. Ngược lại đảo ngược các yếu tố trong bộ sưu tập. Tham gia các nhà khai thác được sử dụng để kết hợp các bộ sưu tập | Part III Base Class Libraries successfully or neither of these actions should happen. If there is a failure when getting the book from stock the credit card should not be charged. Transactions address such scenarios. The most common use of transactions is writing or updating data within the database. Transactions can also be performed when writing a message to a message queue or writing data to a file or the registry. Multiple actions can be part of a single transaction. is discussed in Chapter 45 Message Queuing. Figure 22-1 shows the main actors in a transaction. Transactions are managed and coordinated by the transaction manager and a resource manager manages every resource that influences the outcome of the transaction. The transaction manager communicates with resource managers to define the outcome of the transaction. Transaction Figure 22-1 Transaction Phases The timely phases of a transaction are the active preparing and committing phases Active phase During the active phase the transaction is created. Resource managers that manage the transaction for resources can enlist with the transaction. Preparing phase During the preparing phase every resource manager can define the outcome of the transaction. This phase starts when the creator of the transaction sends a commit to end the transaction. The transaction manager sends a Prepare message to all resource managers. If the resource manager can produce the transaction outcome successfully it sends a Prepared message to the transaction manager. Resource managers can abort the transaction if they fail to prepare by forcing a rollback with the transaction manager by sending a Rollback message. After the Prepared message is sent the resource managers must guarantee to finish the work successfully in the committing phase. To make this possible durable resource managers must write a log with the information from the prepared state so that they can continue from there in case of for example a power .

TỪ KHÓA LIÊN QUAN
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.