SqlGeography Data Type support in Linq to Sql
"One or more selected items contain a data type that is not supported by the designer"
Its a case when we use spatial data types(Geometry,Geography) supported by sql server 2008 in LINQ to SQL.
Step:1 Create a view that is based on the desired table and that does not include the unsupported data type i.e.
A. just include the column as:
CAST(geography_column AS VARBINARY(MAX))
B. Create 3 different columns for Latitude,Longitude and Zoom from single GeoCode column.
GeoCode.Lat as Latitude, GeoCode.Long AS Longitude, GeoCode.Z as Zoom
here GeoCode is column with type Geography in table that is not supported by Linq to Sql
Step 2: Drag the view from Server Explorer/Database Explorer onto the designer.