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
Reverse engineer SqlClient native types: SqlGeometry, SqlGeography, and HierarchyId #10131
Comments
Design notesWhen mapping the column types to CLR types, we can try and load the This requires the user to add the appropriate reference and binding redirects before reverse engineering. Otherwise, these columns won't get scaffolded. Obviously, the assembly will never load on .NET Core since one isn't available. The warning message should probably be different than on .NET Framework, since there is no way to map them. On .NET Framework, we can suggest installing/referencing the assembly if they want to map these columns. |
How will scaffolding know the .net variety? Is it not fw agnostic, basically dropping files in a folder? |
It knows the target framework of the project it's working with. |
But I see your point. Your tool is always running as .NET Framework. Maybe we can provide an internal flag for you to always disable it. |
Thanks, Brice! (An option to disable/enable would be great) |
This does most of the creating and reading the types: https://github.com/dotMorten/Microsoft.SqlServer.Types |
Note this is about reverse engineering to native types. Compare this to #12083 |
Hi, I am trying to use the EF Core scaffolding tool to target a FileTable in SQL Serer. But it is not able to generate the entity type. Am I missing a package to support the reverse engineering of the HierarchyId type? Or is this just not supported in the scaffolding tool? Error message from the
|
Not yet supported. This issue is tracking the work to enable it |
Closing old issue as this is no longer something we intend to implement. EF Core 5 will not support .NET Framework and there is no support for SQL Server native spatial types in .NET Core. |
@ajcvickers What is the recommended way for customers to be able to use spatial with EF at this point? |
See #1100 and #10110. Since these can now be mapped on .NET Framework, it would be good if the scaffolding tool could correctly reverse engineer them. However, note:
Therefore, likely the default behavior should be to not map these types, but warn mentioning an option that can be used to turn on this mapping.
The text was updated successfully, but these errors were encountered: