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

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

Closed
roji opened this issue Feb 12, 2018 · 3 comments
Closed
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@roji
Copy link
Member

roji commented Feb 12, 2018

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.

@roji roji added the enhancement New feature or request label Feb 12, 2018
@roji roji added this to the 2.1.0 milestone Feb 12, 2018
@roji roji self-assigned this Feb 12, 2018
@roji roji changed the title Pluggable type mapper Extensible type mapping and method/operator translation Mar 6, 2018
@roji
Copy link
Member Author

roji commented Mar 12, 2018

@ajcvickers ping

@ajcvickers
Copy link

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

@roji
Copy link
Member Author

roji commented Mar 13, 2018

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

@roji roji changed the title Extensible type mapping and method/operator translation Extensible plugin system for type mapping and method/operator translation May 15, 2018
@roji roji closed this as completed in 695aca5 May 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants