INTERNET APPLICATION DEVELOPMENT
MID MARKET ERP DEVELOPMENT
by Jacky Xu
A client asked us to help him export specific information to a CSV file, and potentially change the file’s column order. In previous projects, I used the entity class to store the data and then export the information to a CSV file. However, to change the file’s column order, I made several changes to the export function so it works how the client wants and created a new process.
The challenge was finding a solution that allowed me to change only the entity definitions, while not changing the export function or negatively affecting the program’s performance.
I decided upon the .Net Dynamic Method to create the export string. Using the entity’s class attributes, I included my customer’s attribute class to store the column name, column order, etc., to create the export string.
I hope you gained additional knowledge through my blog about applying the .Net Dynamic Method to a Project.