I have a couple different csv file structures each having a different column Header name on the column 2 and need to map this column values to the field on the c# entity class and was wondering how i can achieve this using CsvHelper.
Ex: one file will have column Header as "ColumnXYZ" and another file will have column Header as "ColumnABC" and using the CsvHelper will have to first check which column Header name exists on the file and then map the column values to "FieldQwe" of an entity. Both Column Header names will not exist on single file. So looking for any thoughts on handling this scenario.
Can i use something like this on the entity field so the AutoMap works just fine?
[Name("ColumnABC", "ColumnXYZ")]
public string Field1{ get; set; }