tailieunhanh - ASP.NET 4 Unleased - p 97

Chương này cung cấp cho bạn một tổng quan về . Nó mô tả cách bạn có thể sử dụng để đại diện cho dữ liệu cơ sở dữ liệu với mô hình kết nối và ngắt kết nối cả hai dữ liệu truy cập. Trong phần đầu, bạn đã học cách sử dụng các kết nối, Command, và DataReader đối tượng để kết nối với cơ sở dữ liệu, thực thi các lệnh, và đại diện các kết quả của một truy vấn cơ sở dữ liệu. . | 934 CHAPTER 19 Building Data Access Components with Runat server hr asp GridView id grdMovies DataSourceID srcMovies Runat server asp ObjectDataSource id srcMovies TypeName RandomDataLayer SelectMethod GetRandomMovies Runat server div form body html Summary This chapter provided you with an overview of . It described how you can use to represent database data with both a connected and disconnected model of data access. In the first part you learned how to use the Connection Command and DataReader objects to connect to a database execute commands and represent the results of a database query. You learned how to retrieve provider statistics such as command execution times. You also learned how to represent stored procedures with the Command object. Finally you learned how to work with multiple active resultsets MARS . In the second part you learned how to work with the DataAdapter DataTable DataView and DataSet objects. You learned how you can perform batch updates with the DataAdapter object. You also learned how to use the DataTable object to represent and edit database rows. Next you learned how to improve the data access performance of your pages by executing asynchronous database commands within asynchronous pages. Finally you got a chance to tackle the advanced topic of building database objects with .NET Framework. You learned how you can use .NET Framework to build both user-defined types and stored procedures. For example you learned how to insert and select a custom class from a database table by creating a user-defined type with .NET Framework. From the Library of Wow eBook CHAPTER 20 Data Access with LINQ to SQL A vast chasm separates the way developers work with transient application data and the way developers work with persistent database data. In our applications we work with objects and properties created with either C or . In most databases on the other hand we work with tables and columns. This is true