I have a table with a SQL Geometry column. Now I’m trying to work with EF but the mapper doesn’t want to include it (it should be supported by now, as I saw here). Also, I can’t find the Spatial Types in the EF Designer as I saw here.
I have done so far:
PM> Install-Package EntityFramework –IncludePrerelease
'EntityFramework 5.0.0-beta2' already installed.
MyProject already has a reference to 'EntityFramework 5.0.0-beta2'.
and after this, the version of the referenced EnitiyFramework.dll is:
4.4.0.0
Sadly, if you are targeting .net 4, it would not work:
Some features are only available when writing an application that targets .NET 4.5. This includes enum support, spatial data types, table-valued functions and the performance improvements. If you are targeting .NET 4.0 you still get all the bug fixes and other minor improvements.source: http://blogs.msdn.com/b/adonet/archive/2012/03/22/ef5-beta-2-available-on-nuget.aspx
Also, if you are targeting 4.5, look here: How to get enums working in mvc4 with Entity Framework 5 Beta 2?