Click here to Skip to main content
15,914,111 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I am going to use Product Feed from different sites. And I have to save all the product information to out database table.
All the different sites provide different source like Excel or XML file. I have to read that Excel and XML file and save data to our database table.
But all the resources having different column and I have to Map these column according to our database table's column.
Can we map all column in web.config file.
If yes then please help me. How can I map database table's columns in web.config file of asp.net 3.5
Posted

1 solution

Here's how I would do it:

1. Create an XML mapping file for each provider
2. Write a Mapper class for each provider that will parse the appropriate XML file and return a common representation of the mapping.
3. Write a Factory class that will instantiate the correct Mapper based on the provider.
4. All these mappers should inherit from an abstract base class that will have the common functionality.
5. Write a class that will take in a Mapper and do the database stuff from the mapper.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900