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

Please make lowercase keys in ColNamMap dictionary #43

Closed
fedkov opened this issue May 20, 2018 · 1 comment
Closed

Please make lowercase keys in ColNamMap dictionary #43

fedkov opened this issue May 20, 2018 · 1 comment
Labels

Comments

@fedkov
Copy link

fedkov commented May 20, 2018

ColNameMap[Columns[i].ColumnName] = Columns[i];

ColNameMap.TryGetValue(colName, out colMapping);

Mapper doesn't work when column and POCO property are in different case (For example: item_id and Item_ID)

@VitaliyMF
Copy link
Contributor

VitaliyMF commented May 21, 2018

That's correct, in case if column and property are different:

  • use [Column("item_id")] data annotation attr to specify column name (like for EF)
  • or use DbDataAdapter.Select(..).SetMapper(customMapHandler).ToList<Model>() to specify custom mapping logic

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

No branches or pull requests

2 participants