Skip to content

Commit d361456

Browse files
author
Emil Tzvetkov
committed
GH-1180 add descriptive NullableType.ToString
1 parent c3ac6a0 commit d361456

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/NHibernate/Type/NullableType.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,15 @@ public override int GetHashCode()
377377
return (SqlType.GetHashCode() / 2) + (Name.GetHashCode() / 2);
378378
}
379379

380+
/// <summary>
381+
/// Provides a more descriptive string representation by reporting the properties that are important for equality.
382+
/// Useful in error messages.
383+
/// </summary>
384+
public override string ToString()
385+
{
386+
return string.Format("{0}(SqlType: {1})", Name, SqlType);
387+
}
388+
380389
#endregion
381390
}
382391
}

0 commit comments

Comments
 (0)