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

If table column name and entity model field have different case the BulkInsert failed #47

Open
mircomt-soft opened this issue Apr 12, 2021 · 2 comments

Comments

@mircomt-soft
Copy link

mircomt-soft commented Apr 12, 2021

If table column name and entity model field have different case the BulkInsert failed

The bulkinsert is CaseSensitive for names of table column and entity model field

For expample if my table has the column "Name" and my model has the field "NAME" the insert failed with InvalidOperationException because the column mapping is invalid.

@ghost1face
Copy link
Owner

I'd have to see if this still holds true but SqlBulkCopy mapping was always case sensitive: https://docs.microsoft.com/en-us/archive/blogs/yingqin/column-mappings-in-sqlbulkcopy-are-case-sensitive

@mircomt-soft
Copy link
Author

My DB is case insensitive for column name in all queries. For me it would be convenient to have an option to be able to set this behavior regardless of whether it is formally correct.
For everything else congratulations because it works great.

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