Custom Data Structures / Contents

For data content apparently not directly supported, a suitable provider is found in most cases anyway. Business data from applications can generally be passed through the object data provider, if the data is present in comma-separated form, the data provider from the "Dataprovider” sample can be used. Many other data sources support the serialization to XML, so that the XmlDataProvider can be used.

Your own class that implements the IDataProvider interface can be used, too, of course. A good starting point is the DataProvider sample which demonstrates a simple CSV data provider. Often one of the existing classes can be used as base class. If for example a data source is to be connected that implements the IDbConnection interface, it can be inherited from DbConnectionDataProvider. Only the Init method has to be overwritten, where the available tables and relations have to be provided. The component help for .NET provides an example of how this is done for SQL Server data with the SqlConnectionDataProvider. Most database systems provide similar mechanisms.

At github.com/combit/NETDataProviders you'll find Open Source implementations for a range of other data sources like MySQL, PostgreSQL, DB2 and Oracle. These may be a good starting point for your own implemetation as well.