File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -53,17 +53,10 @@ public override System.Type ReturnedClass
53
53
54
54
public override void Set ( IDbCommand st , object value , int index )
55
55
{
56
- var parm = st . Parameters [ index ] as IDataParameter ;
56
+ var parm = ( IDataParameter ) st . Parameters [ index ] ;
57
57
var dateTime = ( DateTime ) value ;
58
- if ( dateTime < customBaseDate )
59
- {
60
- parm . Value = DBNull . Value ;
61
- }
62
- else
63
- {
64
- parm . DbType = DbType . Date ;
65
- parm . Value = dateTime . Date ;
66
- }
58
+ if ( dateTime < customBaseDate ) parm . Value = DBNull . Value ;
59
+ else parm . Value = dateTime . Date ;
67
60
}
68
61
69
62
public override bool IsEqual ( object x , object y )
@@ -127,7 +120,7 @@ public override object DefaultValue
127
120
128
121
public override string ObjectToSQLString ( object value , Dialect . Dialect dialect )
129
122
{
130
- return ' \' ' + ( ( DateTime ) value ) . ToShortDateString ( ) + ' \' ' ;
123
+ return " \' " + ( ( DateTime ) value ) . ToShortDateString ( ) + " \' " ;
131
124
}
132
125
133
126
public void SetParameterValues ( IDictionary < string , string > parameters )
You can’t perform that action at this time.
0 commit comments