Closed CptWesley closed 5 months ago
@CptWesley The approach sounds fine to me. Can you add some tests for the new behavior though? Through PostgresqlDatabaseProvider/SqlServerDatabaseProvider.ToParameterType(Type type)
maybe?
@jeremydmiller I added some tests, but it seems like the same tests for postgres are mostly failing for sqlserver. It appears that exceptions are thrown in different occassions. So I'm not sure how to handle that right now
@CptWesley I'm going to pull your PR in, and deal w/ whatever the test problems are. Got a couple other weasel fixes suddenly backlogged. Thanks for taking that on!
Resolves #128
Copy from issue:
Currenlty the implementation of GetDatabaseType and ToParameterType treat types with generics in different ways:
I would expect these two functions to treat generic types in the same way (otherwise it is always required to add 1 concrete and 1 open version to e.g. the NpgsqlTypeMapping implementation).
My proposal would be to first attempt to find a mapping for the type directly, if there is no such definition, retry on the open generic version of it.