Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A way to check if all mapings succeseded? #254

Open
TMS-Namespace opened this issue May 8, 2023 · 1 comment
Open

A way to check if all mapings succeseded? #254

TMS-Namespace opened this issue May 8, 2023 · 1 comment

Comments

@TMS-Namespace
Copy link

TMS-Namespace commented May 8, 2023

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.

@mganss
Copy link
Owner

mganss commented May 8, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants