When you implement a data provider you are creating two things:
A data provider inherits from the abstract class Sitecore.Data.DataProviders.DataProvider.
Configuration is used to tell Sitecore which data providers a Sitecore database should use.
The following example demonstrates how to define a data provider and add the data provider to the master Sitecore database:
<dataProviders>
<myDataProvider type="Testing.DataProviders.MyDataProvider, Testing" />
</dataProviders>
<databases>
<database id="master">
<dataProviders hint="list:AddDataProvider">
<dataProvider patch:before="*[1]" ref="dataProviders/myDataProvider" />
</dataProviders>
</database>
</databases>
Data providers are handled in the order they appear in the configuration. For more information on configuration and how order is determined, see the section on the Patch Files.
It is important to understand that a data provider is assigned to a Sitecore database, not a Sitecore item. This means that when multiple data providers are assigned to a Sitecore database, all data providers will run for all items in that database.
This is useful because it allows multiple data providers to work together to populate items.
However, this can cause problems if you are not expecting this to happen. If you want to ensure that no subsequent data providers are run after your data provider runs you must use the Abort() method on the CallContext object that is passed to your data provider. For more information on the CallContext type, see the data provider API page.