Пример #1
0
 /// <summary>
 ///     Returns a DATETIME2 parameter value.
 /// </summary>
 /// <param name="value">The parameter value.</param>
 /// <param name="precision">The parameter precision.</param>
 /// <returns>A <see cref="IDbParameterValue" />.</returns>
 public IDbParameterValue DateTime2(DateTime?value, TSqlDateTime2Precision precision)
 {
     if (!value.HasValue)
     {
         return(new TSqlDateTime2NullValue(precision));
     }
     return(new TSqlDateTime2Value(value.Value, precision));
 }
Пример #2
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="TSqlDateTime2Value" /> class.
 /// </summary>
 /// <param name="value">The parameter value.</param>
 /// <param name="precision">The parameter precision.</param>
 public TSqlDateTime2Value(DateTime value, TSqlDateTime2Precision precision)
 {
     _value     = value;
     _precision = precision;
 }
 /// <summary>
 ///     Initializes a new instance of the <see cref="TSqlDateTime2NullValue" /> class.
 /// </summary>
 /// <param name="precision">The parameter precision.</param>
 public TSqlDateTime2NullValue(TSqlDateTime2Precision precision)
 {
     _precision = precision;
 }