ExcelMapper icon indicating copy to clipboard operation
ExcelMapper copied to clipboard

A way to check if all mapings succeseded?

Open TMS-Namespace opened this issue 2 years ago • 1 comments

It seems that we can map any string (column name) to a model by AddMapping, and if the provided column name is wrong, no exception is raised, and it will be just mapped to empty values.

The only way that I found to check this, is to first fetch a dynamic object, and cycle over it's properties, to check if all columns match, then to fetch to a model. I think there should a more convenient mechanism for that.

TMS-Namespace avatar May 08 '23 10:05 TMS-Namespace

Another option is to use custom mapping through SetPropertyUsing and set a flag or whatever when a column is successfully mapped.

mganss avatar May 08 '23 13:05 mganss