A Code Template for Building a Provider Based Feature has been published lately on the Microsoft ASP.NET Developer Center.
This is a Provider ToolKit that gives developers a ready made template for a Provider Model for him/her to customize as the need is.
There is a readme.txt file inside the downloaded Provider ToolKit to help you configure the toolkit to make it work for your application.
If you don't want to read that readme file, then download the utility I created to configure for you that Provider toolkit.
Normally, what you have to configure in that Provider ToolKit is the:
- Provider Name
- NameSpace
- Type of Provider: Microsoft Access, Microsoft Sql Server, Oracle, or MySql
In all the files accompanying the toolkit.
After confgurating that toolkit, you will have a set of classes constituting your Provider Model classes which are:
- MyTestProvider: Which is the base class including all the abstract methods.
- MyTestConfiguration: A class responsible to get all the configuration properties of that provider from the Web.config file.
- MyTestProviderCollection: A class responsible to hold the configurations for each provider configured in the application inside the Web.config file.
- (Sql-Access-MySql-Oracle)MyTestProvider: Is the concrete implementation of the methods inside the MyTestProvider.
- Configuration Sections in the Web.config
In order for you to go through each of the above files and change the names and file names, it would take like 30 to 60 minutes to do so.
The tool I created:
All you have to do is enter the Provider Name (without the*Provider word*), enter the NameSpace (can be left empty), choose an implementation out of the 4 available.
It will do nothing but customize the Provider Toolkit as you want, so no more needed to waste the 30 - 60 minutes trying to configure the files in the Provider toolKit.
Hope this utility helps you. you can download it from the DownLoads Section of my website. I have placed both the code and the executable application.
Happy Dot Netting!
Regards
Tags: