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

SnowflakeDbParameter behavior is incompatible with Entity Framework #54

Closed
jjmason opened this issue Aug 23, 2018 · 3 comments
Closed
Milestone

Comments

@jjmason
Copy link

jjmason commented Aug 23, 2018

Issue description

We have built a simple Entity Framework provider for Snowflake. While doing so we discovered that Entity Framework infrastructure code reads and writes properties found on the SnowflakeDbParameter class (specifically IsNullable, Size, SourceColumn and SourceColumnNullMapping), which are implemented as throwing NotImplementedExceptions.

We've addressed this in a fork by causing these properties to return default values and to reject non-default values passed to their setters, and have submitted PR #55 as a proposed fix.

We believe this is a good compromise between throwing NotImplementedException for all values, and allowing arbitrary values that the rest of the library ignores.

Configuration

Driver version: Snowflake.Data/1.0.2

Dotnet framework and version: netstandard2.0

Server version: 2.55.1

Client OS: Windows 10

@howryu
Copy link
Contributor

howryu commented Aug 31, 2018

Thanks for your contribution. It is merged in #59

@howryu howryu closed this as completed Aug 31, 2018
@buvinghausen
Copy link

@jjmason I was digging around to see if there were any Entity Framework providers for Snowflake on .NET Core and this was the top hit. Would you be willing to open source the provider perchance so we could get an assembly out to NuGet?

@misha130
Copy link

I am using Dapper and #59 doesn't fix this because of the size value being set either way with a certain size.
Ergo if its a four letter string it sets the size to be 4000.

Could this be relaxed even further to not throw exceptions but a warning?
Many libraries use this to add precision but its rather pointless in this connector

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

4 participants