Reading from multiple data sources in C#.Net Winform Application
I wanted to create the .net component which could read the data from multiple data sources like SQLserver, MySql, E开发者_JS百科xcel documents and CSV file. I have little idea about it that I need to implement factory pattern. The information that I want to read is:- 1. Data type of column. 2. Value of column.
Can anybody give me some hints how should I achieve this?
There are two ways to do this.
- Create a base object that contains the generic forms defined virtually of the functionality you want and then write an object which inherits for each type of specific access you want.
- Write and interface which describes the functionality you want and then write object which implement that interface.
You might be able to use existing libraries which already implement your requirements depending on what they are.
精彩评论