@@ -30,6 +30,61 @@ public static IDbDataParameter AddParameter(
3030 return c ;
3131 }
3232
33+ /// <inheritdoc cref="AddParameter(IDbCommand, string, object, DbType, ParameterDirection)"/>
34+ public static IDbDataParameter AddParameter (
35+ this IDbCommand target ,
36+ string name ,
37+ string ? value ) => AddParameter ( target , name , value , DbType . String ) ;
38+
39+ /// <inheritdoc cref="AddParameter(IDbCommand, string, object, DbType, ParameterDirection)"/>
40+ public static IDbDataParameter AddParameter (
41+ this IDbCommand target ,
42+ string name ,
43+ int value ) => AddParameter ( target , name , value , DbType . Int32 ) ;
44+
45+ /// <inheritdoc cref="AddParameter(IDbCommand, string, object, DbType, ParameterDirection)"/>
46+ public static IDbDataParameter AddParameter (
47+ this IDbCommand target ,
48+ string name ,
49+ long value ) => AddParameter ( target , name , value , DbType . Int64 ) ;
50+
51+ /// <inheritdoc cref="AddParameter(IDbCommand, string, object, DbType, ParameterDirection)"/>
52+ public static IDbDataParameter AddParameter (
53+ this IDbCommand target ,
54+ string name ,
55+ short value ) => AddParameter ( target , name , value , DbType . Int16 ) ;
56+
57+ /// <inheritdoc cref="AddParameter(IDbCommand, string, object, DbType, ParameterDirection)"/>
58+ public static IDbDataParameter AddParameter (
59+ this IDbCommand target ,
60+ string name ,
61+ DateTime value ) => AddParameter ( target , name , value , DbType . DateTime ) ;
62+
63+ /// <inheritdoc cref="AddParameter(IDbCommand, string, object, DbType, ParameterDirection)"/>
64+ public static IDbDataParameter AddParameter (
65+ this IDbCommand target ,
66+ string name ,
67+ double value ) => AddParameter ( target , name , value , DbType . Double ) ;
68+
69+
70+ /// <inheritdoc cref="AddParameter(IDbCommand, string, object, DbType, ParameterDirection)"/>
71+ public static IDbDataParameter AddParameter (
72+ this IDbCommand target ,
73+ string name ,
74+ decimal value ) => AddParameter ( target , name , value , DbType . Decimal ) ;
75+
76+ /// <inheritdoc cref="AddParameter(IDbCommand, string, object, DbType, ParameterDirection)"/>
77+ public static IDbDataParameter AddParameter (
78+ this IDbCommand target ,
79+ string name ,
80+ Guid value ) => AddParameter ( target , name , value , DbType . Guid ) ;
81+
82+ /// <inheritdoc cref="AddParameter(IDbCommand, string, object, DbType, ParameterDirection)"/>
83+ public static IDbDataParameter AddParameter (
84+ this IDbCommand target ,
85+ string name ,
86+ DateTimeOffset value ) => AddParameter ( target , name , value , DbType . DateTimeOffset ) ;
87+
3388 /// <summary>
3489 /// Shortcut for adding a command parameter.
3590 /// </summary>
0 commit comments