tailieunhanh - ASP.NET 4 Unleased - p 88
Chú ý Nếu bạn không muốn nhận được bàn tay bẩn chạm vào bất kỳ SQL thực tế hoặc mã , bỏ qua chương này và đọc chương 20, "truy cập dữ liệu với LINQ to SQL." LINQ to SQL cho phép bạn truy cập vào cơ sở dữ liệu mà không cần viết bất cứ hoặc mã SQL. | 844 CHAPTER 19 Building Data Access Components with You also learn how to build Microsoft SQL Server database objects such as stored procedures and user-defined types by using .NET Framework. For example you learn how to write a Microsoft SQL Server stored procedure using C programming language. NOTE If you don t want to get your hands dirty touching any actual SQL or code skip this chapter and read Chapter 20 Data Access with LINQ to SQL. LINQ to SQL enables you to access the database without writing any or SQL code. Connected Data Access The Framework encompasses a huge number of classes. However at its heart it actually consists of the following three classes Connection Enables you to represent a connection to a data source. Command Enables you to execute a command against a data source. DataReader Enables you to represent data retrieved from a data source. Most of the other classes in Framework are built from these three classes. These three classes provide you with the fundamental methods of working with database data. They enable you to connect to a database execute commands against a database and represent the data returned from a database. Now that you understand the importance of these three classes it s safe to tell you that they don t actually exist. uses the Provider model. You use different sets of classes for communicating with different data sources. For example there is no such thing as the Connection class. Instead there are the SqlConnection OracleConnection OleDbConnection and ODBCConnection classes. You use different Connection classes to connect to different data sources. The different implementations of the Connection Command and DataReader classes are grouped into the following namespaces Contains classes for connecting to Microsoft SQL Server version or higher. Contains classes for connecting to a data source with an OLEDB .
đang nạp các trang xem trước