-
Notifications
You must be signed in to change notification settings - Fork 257
Description
Now that Npgsql (ADO) is going to be pluggable, the EF Core provider's type mapper also needs to be pluggable - allow external code to inject/override type mappings (e.g. enable Nodatime). This will only work with Npgsql (ADO) vNext, but it makes sense to build it into 2.1.
The same thing has to happen for operations.
Implementation-wise, it may be sufficient for the EF Core plugin to simply get the current service and wrap it with another one which handles the new types. Or I could expose an API to in NpgsqlTypeMappingSource (and the relevant translator services) which allows adding/overriding mappings and translations. The latter seems a bit cleaner and we end up with one place for all the mappings, rather than multiple layers wrapping each other.
@ajcvickers any thoughts on this? I'm guessing this is somewhat relevant to how users will be adding translations for their custom conversions, so it would be good for these to be aligned.