本文整理汇总了C#中System.Data.SqlTypes.SqlBinary.ToSqlGuid方法的典型用法代码示例。如果您正苦于以下问题:C# SqlBinary.ToSqlGuid方法的具体用法?C# SqlBinary.ToSqlGuid怎么用?C# SqlBinary.ToSqlGuid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Data.SqlTypes.SqlBinary
的用法示例。
在下文中一共展示了SqlBinary.ToSqlGuid方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ToNullableGuid
/// <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; }
示例2: ToSqlGuid
// 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(); }
示例3: ToGuid
/// <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; }
示例4: ToNullableGuid
// 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; }
示例5: ToSqlGuid
// 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; }
示例6: ToGuid
// 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; }
示例7: ToSqlGuid
// 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(); }
示例8: ToGuid
/// <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; }
示例9: ToSqlGuid
public void ToSqlGuid()
{
SqlBinary TestBinary = new SqlBinary (new byte [16]);
SqlGuid TestGuid = TestBinary.ToSqlGuid ();
Assert.IsTrue (!TestGuid.IsNull, "#I01");
}
示例10: ToSqlGuid
public void ToSqlGuid()
{
SqlBinary TestBinary = new SqlBinary (new byte [16]);
SqlGuid TestGuid = TestBinary.ToSqlGuid ();
Assert ("#I01", !TestGuid.IsNull);
}