SUMMARY



SUMMARY

This chapter has taken a focused look at three new topics in ADO.NET 2.0 that can really improve the performance of your data access code—in a variety of ways. As discussed at the start of the chapter, accessing multiple databases, or executing multiple commands against the same database, can lead to code blocking as it waits for expensive processes like opening a database connection or fetching rows from a database to complete.

Instead, the new MARS and asynchronous command execution features in ADO.NET 2.0 can be used individually or together, in a range of scenarios, to reduce the occurrence of code blocking and to minimize the number of connections required by your code.

We also looked at one of the most exciting of the new technologies to come to ADO.NET—ObjectSpaces. This technology allows developers to work easily with objects that expose data in a structured and natural way. On top of this, objects can be reusable, and this approach suits modern application design methodologies. ObjectSpaces removes the need for developers to build complex code into their objects to support serialization, data store persistence, and interaction with Web Services. By simply defining mappings between the objects and the data source (tools will be available to automate this), you can retrieve, manipulate, and persist data as pure .NET objects.

The next chapter completes our tour of the ADO.NET relational data features in version 2.0 of the Microsoft .NET Framework with a look at some more new topics. This time, however, they are all related to the new version of SQL Server, code-named "Yukon."