title: passing in Geography Type and SQL converts to Geography type?
body: <p>I'm figuring out how to take Geography data (Lat/Lon) and add it to a SQL database using a Geography column.  I'm referencing <code>Microsoft.SqlServer.Types</code> to get the <code>SqlGeographyBuilder</code>  </p>
  
  <p><strong><em>I should also add that this is on SQL2008r2</em></strong></p>
  
  <p><strong><em>My C# project is also using .Net 4.0</em></strong></p>
  
  <p>This is just a snippet of code that I'm using in my C# code to do this:</p>
  
  <pre><code>SqlParameter param21 = new SqlParameter();
  
  param21.ParameterName = "@Shape";
  param21.UdtTypeName = "Geography";
  param21.SqlDbType = System.Data.SqlDbType.Udt;
  param21.Size = 1;
  
  SqlGeographyBuilder sqlGeogBuild = new SqlGeographyBuilder();
  SqlGeography sqlGeog = null;
  
  sqlGeogBuild.SetSrid(4267);
  
  if (inputReader[parmLatColumnName].ToString().Length &gt; 0 &amp;&amp; inputReader[parmLonColumnName].ToString().Length &gt; 0)
  {
      sqlGeogBuild.BeginGeography(OpenGisGeographyType.Point);
      sqlGeogBuild.BeginFigure(float.Parse(inputReader[parmLatColumnName].ToString()), float.Parse(inputReader[parmLonColumnName].ToString()));
      sqlGeogBuild.EndFigure();
      sqlGeogBuild.EndGeography();
      sqlGeog = sqlGeogBuild.ConstructedGeography;
      param21.Value = sqlGeog;
  }
  else
  {
      param21.Value = DBNull.Value;
  }
  
  sqlComm.Parameters.Add(param21);
  </code></pre>
  
  <p>When I used the profiler I found that my query looked like this:</p>
  
  <pre><code>declare @p21 sys.geography
  set @p21=convert(sys.geography,0xE6100000010C00000080B0374040000000806BD057C0)
  
  exec insPoints @stCty=N'31256',@InstrumentType=N'''ogVal''',@FileDate='2008-01-03 00:00:00',@EntryNumber=N'''500''',@Vol=N'NULL',@Page=N'NULL',@Lessor=N'''name''',@Lessee=N'''company name''',@InstrumentDate='2000-01-12 00:00:00',@Term=3,@TermType=N'''Years''',@Expiration='2010-07-12 00:00:00',@Royalty=0.000100000,@GrossAcres=1.000000000,@AgencyId=N'NULL',@Agency=N'''Fee''',@EffDate=NULL,@Survey=N'''A500,A06,A700,A400,A900''',@Longitude=-91.000000000,@Latitude=30.000000000,@Shape=@p21
  </code></pre>
  
  <p>Why does it convert it to a Geography type when I'm passing it in as a Geography type?</p>