本文整理汇总了C#中SqlString.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# SqlString.ToString方法的具体用法?C# SqlString.ToString怎么用?C# SqlString.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SqlString
的用法示例。
在下文中一共展示了SqlString.ToString方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: String_Concat
public void String_Concat()
{
const string s1 = "First string comes before the ";
const string s2 = "Second string that comes after";
var sqlString1 = new SqlString(s1);
var sqlString2 = new SqlString(s2);
var sqlString3 = new SqlString();
Assert.DoesNotThrow(() => sqlString3 = sqlString1.Concat(sqlString2));
Assert.AreEqual("First string comes before the Second string that comes after", sqlString3.ToString(Encoding.UTF8));
}
示例2: CurrentValue
public static SqlNumber CurrentValue(IQueryContext context, SqlString tableName)
{
var tableNameString = tableName.ToString();
var resolvedName = context.ResolveTableName(tableNameString);
return context.GetCurrentValue(resolvedName);
}
示例3: Cast
public static DataObject Cast(IQueryContext context, DataObject value, SqlString typeString)
{
var destType = DataType.Parse(context, typeString.ToString());
return Cast(value, destType);
}
示例4: FromWkt
public static SqlGeometry FromWkt(SqlString source)
{
SqlGeometry geometry;
if (!SqlGeometry.TryParse(source.ToString(), out geometry))
return SqlGeometry.Null;
return geometry;
}
示例5: UniqueKey
public static SqlNumber UniqueKey(IRequest request, SqlString tableName)
{
var tableNameString = tableName.ToString();
var resolvedName = request.Access().ResolveTableName(tableNameString);
return request.Access().GetNextValue(resolvedName);
}
示例6: NextValue
public static SqlNumber NextValue(IRequest request, SqlString sequenceName)
{
var objName = ObjectName.Parse(sequenceName.ToString());
var resolvedName = request.Access().ResolveObjectName(DbObjectType.Sequence, objName);
return request.Access().GetNextValue(resolvedName);
}
示例7: CurrentValue
public static SqlNumber CurrentValue(IRequest query, SqlString sequenceName)
{
var objName = ObjectName.Parse(sequenceName.ToString());
var resolvedName = query.Access().ResolveObjectName(DbObjectType.Sequence, objName);
return query.Access().GetCurrentValue(resolvedName);
}
示例8: CurrentValue
public static SqlNumber CurrentValue(IRequest query, SqlString tableName)
{
var tableNameString = tableName.ToString();
var resolvedName = query.Query.ResolveTableName(tableNameString);
return query.Query.GetCurrentValue(resolvedName);
}