Modifying the Data Access Application Block

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The latest Enterprise Library information can be found at the Enterprise Library site.

The Data Access Application Block was designed to be used in a variety of applications. With its extension points, you can adapt the application block to suit the needs of a specific application. However, if you want to add new features to the application block, you can do so by modifying the source code (the application block ships with both the source code and the binaries). If you decide to modify the source code, follow the recommendations in this section.

Recommendations for Modifying the Data Access Application Block

When you modify the source code, follow these best practices:

  • Make sure that you understand how the application block works by reading the Design section of this documentation.
  • It is strongly recommended that you change the Data Access Application Block's namespace if you alter the code significantly or if want to use your customized version of the application block along with the original version. Note that changing the application block's namespace requires you to change the namespace of all other application blocks and applications that use the Data Access Application Block.
  • Use strong naming. Strong named assemblies can be uniquely identified, versioned, and checked for integrity. You will have to generate your own key pair to sign your modified version of the application block. For more information, see Strong Named Assemblies and Versioning Tutorial. Alternatively, you can choose to not sign your custom version. This is referred to as weak naming.
  • You must recompile your code for your modifications to take effect. Open the Data Access Application Block Visual Studio solution file, and then rebuild the entire solution.
  • Use the unit tests that accompany the Data Access Application Block as a basis for your own unit tests. Test your code early and often.
Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The latest Enterprise Library information can be found at the Enterprise Library site.