views:

15

answers:

2

Hi, I am having a few problems loading a table into the designer. I get the following error.

One or more selected items contain a data type that is not supported by the designer

Would I be correct in assuming it is the geography type used in the table that is causing this error?

Any pointers much appreciated.

A: 

Check below article / answer for the detail :

SqlGeography and Linq to Sql

Is it possible to use SqlGeography with Linq to Sql?

Spatial types are not supported by Linq to SQL. Support is not "not great" - it's nonexistent.

You can read them as BLOBs, but you can't do that by simply changing the column type in Linq to SQL. You need to alter your queries at the database level to return the column as a varbinary, using the CAST statement. You can do this at the table level by adding a computed varbinary column, which Linq will happily map to a byte[].

Pranay Rana
Thanks, this project has just started. Would I be better to move to a different table mapping(orm) framework that supports the geography type? Are there any?
Chin
@Chin - check the article where some work around are there i hope that will work for you -- than no need to move on another orm
Pranay Rana
A: 

To correct this error

  1. Create a view that is based on the desired table and that does not include the unsupported data type. 2.Drag the view from Server Explorer/Database Explorer onto the designer.

or you can see this article The Missing Linq to SQL Spatial,This article provides hints and hacks on how to use the SQL Server spatial data types -Geography and Geometry- in Linq to SQL

Akyegane