Skip to content

Commit

Permalink
Use TryParse with Guid, fallback to String
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgindi committed Jun 25, 2018
1 parent ea6af58 commit dd7bf8a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions dg.Sql/Sql/Query/Query.cs
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,11 @@ public static void PrepareColumnValue(TableSchema.Column columnDefinition, objec
}
else if (columnDefinition.Type == typeof(Guid))
{
Guid gValue = new Guid((string)value);
value = gValue;
Guid gValue;
if (Guid.TryParse((string)value, out gValue))
{
value = gValue;
}
}
}
else
Expand Down

0 comments on commit dd7bf8a

Please sign in to comment.