Because I’ve had a lot of conversations about spatial data types lately, I thought I would create a SQL Server table that contained one of every type then bring it into an entity data model using the wizard to see what happens. This is in EF4.
Here are screenshots of the table and the entity showing their property types.
This way you can see what is and isn’t supported. The wizard excluded four fields it still doesn’t recognize at all.
- geography
- geometry
- hierarchyid
- sql_variant
If you focus on the entity, you can compare the property names to the property types to see how different data types are treated. E.g. the xml property is a String and the real property is a Single.
The fields that use Max become properties whose Max Length property =”Max”



