Skip to content

NpgsqlParameter<T> converter binding semantics #5142

@NinoFloris

Description

@NinoFloris

Currently we kind of blend the strongly typed and weakly typed behaviors.

In #5123 I've changed this to be strongly typed throughout the binding process for NpgsqlParameter<T>, unless T = object. This also affects setting values of types deriving from T. Instead we will always bind strongly to T. If runtime lookups are preferred NpgsqlParameter or NpgsqlParameter<object> should be used.

As a consequence we also don't interpret DBNull as a db null value when T = DBNull (by default, a converter can still choose to do so).

Practically nothing much really changes, this is just a formalization of the desired behavior. We continue to do the expected thing for NpgsqlParameter and NpgsqlParameter<object>, which should cover the legitimate cases.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions