Last post Mar 15, 2016 03:23 PM by ignatandrei
Mar 08, 2016 11:45 AM|constantlearner4net|LINK
I need to use a source data (basically a database table with different columns and data loaded or a csv file) and then create different files (lets call them destination files) in different formats (text,excel,pdf etc) based on source data using mappings
from columns in source data to columns in destination files. The format and no. of columns would be different for different destination files but source data would be same for all. If a new destination file needs to be created in future, the solution design
should as simple as just adding another template for the new file and add to existing templates set.
any idea on above approach please, what comes in my mind is xml templates using xsd schema but any code references to the said approach would be greatly appreciated. Also, any other strategies and code references for the same would also help.
Source data - can be SQL database table or a CSV file
need to write in C#
Mar 09, 2016 03:57 PM|ignatandrei|LINK
DataTable is the most generic approach
Mar 10, 2016 05:46 PM|constantlearner4net|LINK
Can you please a bit specific. Thank You.
Mar 15, 2016 03:23 PM|ignatandrei|LINK
read the sql with IDataReader. This have a
function to transform in DataTable.
And you can put any dynamic select into a datatable