Skip to content

Extensible plugin system for type mapping and method/operator translation #300

Closed

Description

@roji

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.

Activity

  1. added this to the 2.1.0 milestone on Feb 12, 2018
  2. self-assigned this
    on Feb 12, 2018
  3. changed the title [-]Pluggable type mapper[/-] [+]Extensible type mapping and method/operator translation[/+] on Mar 6, 2018
  4. roji commented on Mar 12, 2018

    @roji
    MemberAuthor
  5. ajcvickers commented on Mar 12, 2018

    @ajcvickers

    @roji Honestly...I don't know, but I commented on #11236, so maybe that helps?

  6. roji commented on Mar 13, 2018

    @roji
    MemberAuthor

    Yeah, it's very related, let's continue the conversation on dotnet/efcore#11236 (I answered there).

  7. changed the title [-]Extensible type mapping and method/operator translation[/-] [+]Extensible plugin system for type mapping and method/operator translation[/+] on May 15, 2018
  8. added a commit that references this issue on May 15, 2018
    695aca5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions