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

Reverse Engineer: Can we just scaffold string properties for xml, hierarchyid, geography, geometry, etc #3076

Closed
rowanmiller opened this issue Sep 9, 2015 · 8 comments
Assignees
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Milestone

Comments

@rowanmiller
Copy link
Contributor

Some of these datatypes may just work with an implicit conversion to/from string. We need to investigate which ones work (or can work with minimal changes) and then update reverse engineer to scaffold a string property for them.

@bricelam
Copy link
Contributor

@nteague22 It may require a few changes, but we should be able to set the parameter type using the SqlServerTypeMapper.

@nteague22
Copy link

Excellent, I really am impressed with the work you guys produce and the team as a whole! Even in beta, EF7 makes my life easier on running ETL and other data migratory operations

@wangkanai
Copy link

How is issue going? I still that the https://github.com/aspnet/EntityFramework/blob/dev/src/EntityFramework.MicrosoftSqlServer/Storage/Internal/SqlServerTypeMapper.cs is unchanged.
Hoping to see this feature add by rc1 :)

@bricelam
Copy link
Contributor

@wangkanai Have you tried manually adding the properties to your model?

@wangkanai
Copy link

@bricelam Do you mean like mapping a object property System.Data.Spatial to Spatial Data Types in demo application? No 😄, don't know where to start, still studying your codebase.
Or add RelationalTypeMapping to your SqlServerTypeMapper.cs class?

private readonly RelationalTypeMapping _geography = new RelationalTypeMapping("geography");
private readonly RelationalTypeMapping _geometry = new RelationalTypeMapping("geometry");

*Did some testing, and it go very deep into the core * 😅 skiming guess, its going to take a few 100 manhours base on my skills

@gitmar
Copy link

gitmar commented Jan 5, 2016

Fail to try scaffolding a xml sql datatype and fail to manually add the property in my model. Dont know how to do that manually.
Could not find type mapping for column 'dbo.mytable.myxmlcolumn' with data type 'xml'. Skipping column.

@lajones
Copy link
Contributor

lajones commented Feb 23, 2016

Have checked in a fix for xml columns (@gitmar this should solve your problem above) - commit a8b185f.

@lajones lajones modified the milestones: 1.0.0-rc2, 1.0.0 Feb 23, 2016
@lajones
Copy link
Contributor

lajones commented Feb 23, 2016

Support for hierarchyId and spatial types is more complicated and not yet supported by the update and query pipelines. So closing this in favor of #365 (which tracks hierarchyid) and #1100 (which tracks support for spatial types).

@lajones lajones closed this as completed Feb 23, 2016
@ajcvickers ajcvickers modified the milestones: 1.0.0-rc2, 1.0.0 Oct 15, 2022
@ajcvickers ajcvickers added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Oct 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Projects
None yet
Development

No branches or pull requests

7 participants