Skip to content

Commit

Permalink
Fix | bugs in SqlBuffer.get_Guid & get_SqlValue (dotnet#2300)
Browse files Browse the repository at this point in the history
introduced by PR dotnet#2306
  • Loading branch information
wilbit committed Jan 21, 2024
1 parent 45b5b50 commit daec178
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ internal Guid Guid
}
else if (StorageType.SqlGuid == _type)
{
return ((SqlGuid)_object).Value;
return _value._guid;
}
return (Guid)Value;
}
Expand Down Expand Up @@ -972,6 +972,8 @@ internal object SqlValue
return SqlSingle;
case StorageType.String:
return SqlString;
case StorageType.SqlBinary:
return _object;

case StorageType.SqlCachedBuffer:
{
Expand All @@ -983,9 +985,8 @@ internal object SqlValue
return data.ToSqlXml();
}

case StorageType.SqlBinary:
case StorageType.SqlGuid:
return _object;
return SqlGuid;

case StorageType.SqlXml:
if (_isNull)
Expand Down

0 comments on commit daec178

Please sign in to comment.