1 / 28

Chapter 5

Chapter 5. Truy xuất dữ liệu với LINQ. NỘI DUNG. Validate data Stores Procedures Transaction. Validate data. Kiểm tra dữ liệu cho 1 cột trong bảng Quan hệ giữa các cột trong thực thể Kiểm tra dữ liệu khi cập nhật 1 thực thể. Kiểm tra dữ liệu cho 1 cột trong bảng.

javen
Télécharger la présentation

Chapter 5

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 5 Truyxuấtdữliệuvới LINQ

  2. NỘI DUNG • Validate data • Stores Procedures • Transaction

  3. Validate data • Kiểm tra dữ liệu cho 1 cột trong bảng • Quan hệ giữa các cột trong thực thể • Kiểm tra dữ liệu khi cập nhật 1 thực thể

  4. Kiểm tra dữ liệu cho 1 cột trong bảng

  5. Kiểm tra dữ liệu cho 1 cột trong bảng Quản lý nhập liệu trên DataGridView dùng sự kiện DataError:

  6. Quan hệ giữa các cột trong thực thể

  7. Kiểm tra dữ liệu khi cập nhật 1 thực thể

  8. Stored Procedures • Stored Procedures trả về Rowsets • Stored Procedures có Parameters • Stored Procedures trả về nhiều Result Shapes • Stored Procedures trả về Sequential Result Shapes • Stored Procedures khi Insert, Update, Delete • Stored Procedures hỗ trợ các hàm do người dùng tự định nghĩa

  9. Stored Procedures trả về Rowsets

  10. Stored Procedures trả về Rowsets

  11. Stored Procedures có Parameters

  12. Stored Procedures có Parameters

  13. Stored Procedures trả về nhiều Result Shapes

  14. Stored Procedures trả về nhiều Result Shapes

  15. Stored Procedures trả về Sequential Result Shapes

  16. Stored Procedures trả về Sequential Result Shapes

  17. Stored Procedures khi Insert, Update, Delete • Tạo Stored Procedure cho các câu lệnh Insert, Update, hoặc Delete trong DBMS: • Override lại các phương thức InsertTableName, UpdateTableName, DeleteTableName • Gọi Stored Proc bằng custom design

  18. Stored Procedures khi Insert, Update, Delete Override:

  19. Stored Procedures khi Insert, Update, Delete Custom Design: dùng stored proc cho bảng nào, mở cửa sổ properties bảng đó

  20. Stored Procedures khi Insert, Update, Delete Custom Design:

  21. Hỗ trợ các hàm do người dùng tự định nghĩa

  22. Hỗ trợ các hàm do người dùng tự định nghĩa

  23. Transaction • Transaction: được định nghĩa như là một chuỗi các thao tác thực thi cùng với nhau như là một khối thống nhất đơn của công việc. • Một khối thống nhất của công việc phải có bốn đặc điểm được gọi là ACID (Atomicity, Consistency, Isolation, và Durability).

  24. Transaction • LINQ hỗ trợ 3 loại transactions: • Explicit Local Transaction (IdbTransaction) • Explicit Distributable Transaction (TransactionScope) • Implicit Transaction

  25. DbTransaction

  26. DbTransaction

  27. TransactionScope

  28. TransactionScope

More Related