In the previous chapter, you had your first look at ADO.NET, and you examined connection-based data access. Now, it's time to bring your data access code into a well-designed application.
In a properly organized application, your data access code is never embedded directly in the code-behind for a page. Instead, it's separated into a dedicated database component. In this chapter, you'll see how to create a simple data access class of your own, adding a separate method for each data task you need to perform. Best of all, your database component won't be limited to code-only scenarios. In the next chapter, you'll see how to consume your database component with ASP.NET's new data binding infrastructure.