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

SQL Server: support for mapping user defined types (UDT) #12796

Open
divega opened this issue Jul 25, 2018 · 0 comments
Open

SQL Server: support for mapping user defined types (UDT) #12796

divega opened this issue Jul 25, 2018 · 0 comments

Comments

@divega
Copy link
Contributor

divega commented Jul 25, 2018

This issue is about being able to use properties of .NET types that are registered as UDT types on SQL Server.

This issue is not about supporting SQL Server spatial or hierarchyid types, which happen to be implemented like UDTs. Directly mapping to SQL Server spatial types is already enabled in 2.1 wherever the types are available (currently only .NET Framework), and our full spatial story is tracked at #1100. I am splitting this issue from supporting hierachyid that was originally reported at #365, because I believe in order to property support hierarchyid we would need additional function mapping.

Enabling SQL Server UDTs would involve adding APIs to register custom type mappings and making sure you can issue queries that read values or pass parameters or even literals of these types.

The necessary features were added in SqlClient for .NET Core in 2.1. Note that UDTs need CLR types that are registered on the server and available on the client for the ADO.NET layer. SqlClient’s mechanism happens to be very simple but also inflexible. Here is a call to create a true plug-in model:
https://github.com/dotnet/corefx/issues/29139.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants