Free mag vol1 | Page 868

CHAPTER 21  ADO.NET PART I: THE CONNECTED LAYER } return conn; } } } The benefit of working with the general interfaces of System.Data (or for that matter, the abstract base classes of System.Data.Common) is that you have a much better chance of building a flexible code base that can evolve over time. For example, today you might be building an application that targets Microsoft SQL Server; however, it’s possible your company could switch to a different database months down the road. If you build a solution that hard-codes the MS SQL Server–specific types of System.Data.SqlClient, you would obviously need to edit, recompile, and redeploy the assembly should the back-