Skip to content

Commit

Permalink
Update SqlParameter example
Browse files Browse the repository at this point in the history
Direct users to take advantage of dotnet/corefx#35470
  • Loading branch information
bricelam committed Sep 9, 2019
1 parent 15294c5 commit 403e6f3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,10 @@ Write parameters like this.
var geometry = new Point(-122.129797, 47.640049) { SRID = 4326 };
var geometryWriter = new SqlServerBytesWriter { IsGeography = true };
var bytes = geometryWriter.Write(geometry);
command.Parameters.AddWithValue(parameterName, new SqlBytes(bytes));
var parameter = command.Parameters
.AddWithValue(parameterName, new SqlBytes(bytes));

// TODO: Set these if you're using Microsoft.Data.SqlClient
//parameter.SqlDbType = SqlDbType.Udt;
//parameter.UdtTypeName = "geography";
```

0 comments on commit 403e6f3

Please sign in to comment.