Skip to content

Commit ebf0c88

Browse files
committed
Fix | SqlBuffer.get_SqlGuid could return incorrect Guid (#2310)
after SetToNullOfType(StorageType.Guid) is invoked
1 parent 6b67060 commit ebf0c88

File tree

1 file changed

+1
-1
lines changed
  • src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient

1 file changed

+1
-1
lines changed

src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlBuffer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,7 @@ internal SqlGuid SqlGuid
811811
{
812812
if (StorageType.Guid == _type)
813813
{
814-
return new SqlGuid(_value._guid);
814+
return IsNull ? SqlGuid.Null : new SqlGuid(_value._guid);
815815
}
816816
else if (StorageType.SqlGuid == _type)
817817
{

0 commit comments

Comments
 (0)