SqlDbType and Geography
SqlGeography
is implemented as a CLR user defined type by SQL Server, so you can do something a little like:
SqlGeography geo = // Get the geography from somewhere...
using (SqlCommand command =
new SqlCommand(@"dbo.up_Foobar_Insert", connection))
command.Parameters.Add(new SqlParameter("@Point", geo) { UdtTypeName = "Geography" });
command.ExecuteNonQuery();
}
If it is a desktop application you've got it quite a bit easier. There is a good example at the Code Project of an SQL Geometry viewer that will help for both desktop or web.
You need to reference Microsoft.SqlServer.Types.dll, found at SQL Server Install/100/SDK/Assemblies to use SQLGeometry or SQLGeography directly.