src/Projac.SqlClient/TSqlDateTime2Value.cs
/// <summary>
///     Creates a <see cref="SqlParameter" /> instance based on this instance.
/// </summary>
/// <param name="parameterName">The name of the parameter.</param>
/// <returns>
///     A <see cref="SqlParameter" />.
/// </returns>
Creates a  instance based on this instance.
Creates a instance based on this instance .
public SqlParameter ToSqlParameter(string parameterName)
        {
#if NET46 || NET452
            return new SqlParameter(
                parameterName,
                SqlDbType.DateTime2,
                8,
                ParameterDirection.Input,
                false,
                _precision,
                0,
                "",
                DataRowVersion.Default,
                _value);
#elif NETSTANDARD2_0
            return new SqlParameter 
                {
                    ParameterName = parameterName,
                    Direction = ParameterDirection.Input,
                    SqlDbType = SqlDbType.DateTime2,
                    Size = 8,
                    Value = _value,
                    SourceColumn = "",
                    IsNullable = false,
                    Precision = _precision,
                    Scale = 0,
                    SourceVersion = DataRowVersion.Default
                };
#endif
        }
public SqlParameter ToSqlParameter ( string parameterName ) { if NET46 || NET452 return new SqlParameter ( parameterName , SqlDbType . DateTime2 , 8 , ParameterDirection . Input , false , _precision , 0 , " " , DataRowVersion . Default , _value ) ; elif NETSTANDARD2_0 return new SqlParameter { ParameterName = parameterName , Direction = ParameterDirection . Input , SqlDbType = SqlDbType . DateTime2 , Size = 8 , Value = _value , SourceColumn = " " , IsNullable = false , Precision = _precision , Scale = 0 , SourceVersion = DataRowVersion . Default } ; endif }
Creates a  instance based on this instance.
Creates a instance based on this instance .
None
parameterName
string
The name of the parameter.
The name of the parameter .