SqlType ConvertToSqlDbType Method Nemiro.Data.dll
Converts the specified .NET type to SQL Server type.

Namespace: Nemiro.Data.Sql
Assembly: Nemiro.Data (in Nemiro.Data.dll) Version: 2.11.4.126 (2.11.4.126)
Syntax

public static SqlDbType ConvertToSqlDbType(
	Type t,
	Version version = null
)

Parameters

t
Type: System Type
.NET type.
version (Optional)
Type: System Version
Version SQL Server.

Return Value

Type: SqlDbType
Examples

SqlDbType result = SqlType.ConvertToSqlDbType(typeof(long));
Console.WriteLine("SQL Server type: {0}", result.ToString());
See Also