- asp.net mvc
- IT 관련
Enterprise Library 4.1 - The Data Access Application Block 본문
Enterprise Library 4.1 - The Data Access Application Block재우니 2009. 9. 8. 01:31
The Enterprise Library Data Access Application Block simplifies development tasks that implement common data access functionality. Applications can use this application block in a variety of situations, such as reading data for display, passing data through application layers, and submitting changed data back to the database system. The application block includes support for both stored procedures and in-line SQL. Common housekeeping tasks, such as managing connections and creating and caching parameters, are encapsulated in the application block's methods. In other words, the Data Access Application Block provides access to the most often used features of ADO.NET in simple-to-use classes; this boosts developer productivity.
ADO.NET 2.0 provides classes such as the DbCommand class and the DbConnection class; these classes help to abstract the data provider from any particular database implementation. The Data Access Application Block takes advantage of these classes and provides a model that further supports encapsulation of database type–specific features, such as parameter discovery and type conversions. Because of this, applications can be ported from one database type to another without modifying the client code. The Data Access Application Block includes an abstract base class that defines a common interface and that provides much of the implementation needed by the data access methods available in ADO.NET 2.0.
The application block also includes classes that are specific to Microsoft SQL Server, Microsoft SQL Server CE, and Oracle. These classes perform operations that are particular to the database type. The code for applications written for one type of database, such as SQL Server, looks much the same as the code for applications written for another type of database, such as Oracle.
Another feature of the Data Access Application Block is that application code can refer to particular databases by an ADO.NET connection string name, such as "Customer" or "Inventory." The application code can specify a named instance of a database and pass this parameter to the DatabaseFactory.CreateDatabase method. Each named database has its connection information stored in a configuration file. By changing the settings in the configuration file, developers can use their applications with different database configurations without recompiling their code.
The Data Access Application Block provides the following benefits:
- It uses the functionality provided by ADO.NET 2.0 and with it, you can use ADO.NET functionality along with the application block's functionality.
- It reduces the need to write boilerplate code to perform standard tasks.
- It helps maintain consistent data access practices, both within an application and across the enterprise.
- It reduces difficulties in changing the database type.
- It relieves developers from learning different programming models for different types of databases.
- It reduces the amount of code that developers must write when they port applications to different types of databases.
This section includes the following topics:
For more information, see the following resources:
'닷넷관련 > ASP.NET WEBFORM' 카테고리의 다른 글
|Dynamic Data Templates in ASP.NET 3.5 - by Gayani Devapriy (0)||2009.09.15|
|ASP.NET 3.5 Dynamic Data 에서 사용할 있는 Attribute 들.. (0)||2009.09.15|
|Enterprise Library 4.1 - The Data Access Application Block (0)||2009.09.08|
|ASP.NET GridView 정렬 및 페이징 Optimize (0)||2009.09.05|
|jQuery 와 s3capcha 로 captcha 만들기 (0)||2009.08.31|
|int.TryParse 로 request 처리하기 (0)||2009.08.31|