<p>I am using sql express 2008 and vs2008, writing in c#.</p>

<p>I have a db table with a Geography column in it, into which I need to put gps data I collected. When I tried creating an Entity-Framework mapping for this table, it just ignored the column with some warning about not being able to map such column types.
I then looked at nHibernate.Spatial project, but it seems like it only translates the Geometry types, not the Geography. No luck there.
I've been told I can use a view with casting the Geography to VarBinary, and then in the created entity class add another Property that deserializes the binary back into Geography. I guess that will work for reading the data from the db, but I also need to insert those rows into my db, and I can't add rows to the view.
Is there some other trick I can use in order to easily read and write Geography data from my db, in my c# code?</p>

I don't know much about EF, but NHibernate allows you to extend it's type framework using
```
IUserType
```
. There's a bit about it on
Ray Houston's Blog
.
I've successfully used this to create a type for that uses XmlSerialization to an Xml field, based on
Ayende's example