code_junkie

Using SQL Server 2008 Geography types with nHibernate's CreateSQLQuery

Nov 11th, 2011
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. sqlstring = string.Format("set nocount on;update myusers set geo=geography::Point({0}, {1}, 4326) where userid={2};", mlat, mlong, userid);
  2. _session.CreateSQLQuery(sqlstring).ExecuteUpdate();
  3.  
  4. set nocount on;update myusers set geo=geography@p0({0}, {1}, 4326) where userid={2};
Add Comment
Please, Sign In to add comment