Writing a Simple Data Provider

Functionally, a simple .NET managed data provider is nearly identical to the DirectoryListing class we examined earlier. In terms of the internal structure, though, a significant gap exists between the two. A generic class such as DirectoryListing has no particular requirements, which can make it the major strength or the weakest point of your solution. In contrast, the class that outfits a simple managed data provider must implement the IDataAdapter interface and, subsequently, must expose a precise number of methods and properties.

Let’s consider extending the DirectoryListing class so that it works as a data provider. The class will need at least two constructors. The default constructor takes no argument and ...

Get Building Web Solutions with ASP.NET and ADO.NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.