/// <summary> /// Converts the value of the specified SqlBinary to its equivalent nullable Guid. /// </summary> /// <param name="value">An SqlBinary.</param> /// <returns>The equivalent nullable Guid.</returns> public static Guid? ToNullableGuid(SqlBinary value) { return value.IsNull ? null : (Guid?)value.ToSqlGuid().Value; }
// SqlTypes. /// <summary> /// Converts the value of the specified SqlBinary to its equivalent SqlGuid representation. /// </summary> /// <param name="value">An SqlBinary.</param> /// <returns>The equivalent SqlGuid.</returns> public static SqlGuid ToSqlGuid(SqlBinary value) { return value.ToSqlGuid(); }
/// <summary> /// Converts the value of the specified SqlBinary to its equivalent Guid. /// </summary> /// <param name="value">An SqlBinary.</param> /// <returns>The equivalent Guid.</returns> public static Guid ToGuid(SqlBinary value) { return value.IsNull ? Guid.Empty : value.ToSqlGuid().Value; }
// Sql Types // /// <summary>Converts the value from <c>SqlBinary</c> to an equivalent <c>Guid?</c> value.</summary> public static Guid? ToNullableGuid(SqlBinary p) { return p.IsNull ? (Guid?)null : p.ToSqlGuid().Value; }
// Sql Types // /// <summary>Converts the value from <c>SqlBinary</c> to an equivalent <c>SqlGuid</c> value.</summary> public static SqlGuid ToSqlGuid(SqlBinary p) { return p.IsNull ? SqlGuid.Null : p.ToSqlGuid().Value; }
// Sql Types // /// <summary>Converts the value from <c>SqlBinary</c> to an equivalent <c>Guid</c> value.</summary> public static Guid ToGuid(SqlBinary p) { return p.IsNull ? Configuration.NullableValues.Guid : p.ToSqlGuid().Value; }
// SqlTypes // /// <summary>Converts the value from <c>SqlBinary</c> to an equivalent <c>SqlGuid</c> value.</summary> public static SqlGuid ToSqlGuid(SqlBinary p) { return p.ToSqlGuid(); }
/// <summary>Converts the value from <c>SqlBinary</c> to an equivalent <c>Guid</c> value.</summary> public static Guid ToGuid(SqlBinary p) { return p.IsNull? Guid.Empty: p.ToSqlGuid().Value; }
public void ToSqlGuid() { SqlBinary TestBinary = new SqlBinary (new byte [16]); SqlGuid TestGuid = TestBinary.ToSqlGuid (); Assert.IsTrue (!TestGuid.IsNull, "#I01"); }
public void ToSqlGuid() { SqlBinary TestBinary = new SqlBinary (new byte [16]); SqlGuid TestGuid = TestBinary.ToSqlGuid (); Assert ("#I01", !TestGuid.IsNull); }