From 89ff7da6291955c6f995df965284d638d632a128 Mon Sep 17 00:00:00 2001 From: Ushakov Michael Date: Wed, 11 May 2022 00:27:02 +0500 Subject: [PATCH] more values --- .../Factories/DbParameterFactory.cs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/DbTools/DbTools.Simple/Factories/DbParameterFactory.cs b/DbTools/DbTools.Simple/Factories/DbParameterFactory.cs index 4c148a9..685f3e8 100644 --- a/DbTools/DbTools.Simple/Factories/DbParameterFactory.cs +++ b/DbTools/DbTools.Simple/Factories/DbParameterFactory.cs @@ -93,7 +93,7 @@ private static object MapMySqlParameterValue(MySqlDbType type, object value) { SqlDbType.NVarChar, typeof(string)}, { SqlDbType.Real, typeof(Single)}, { SqlDbType.SmallDateTime, typeof(DateTime)}, - { SqlDbType.SmallInt, typeof(int)}, + { SqlDbType.SmallInt, typeof(Int16)}, { SqlDbType.SmallMoney, typeof(decimal)}, { SqlDbType.Text, typeof(string)}, { SqlDbType.Timestamp, typeof(byte[])}, @@ -104,7 +104,20 @@ private static object MapMySqlParameterValue(MySqlDbType type, object value) private static readonly IDictionary MySqlTypesMapping = new Dictionary() { - { MySqlDbType.Decimal, typeof(decimal) } + { MySqlDbType.Decimal, typeof(decimal) }, + { MySqlDbType.Byte, typeof(byte) }, + { MySqlDbType.Int16, typeof(Int16) }, + { MySqlDbType.Int24, typeof(int) }, + { MySqlDbType.Int32, typeof(int) }, + { MySqlDbType.Int64, typeof(long) }, + { MySqlDbType.Float, typeof(Single) }, + { MySqlDbType.Double, typeof(double) }, + { MySqlDbType.Timestamp, typeof(DateTime) }, + { MySqlDbType.Date, typeof(DateTime) }, + { MySqlDbType.Time, typeof(string) }, + { MySqlDbType.DateTime, typeof(DateTime) }, + { MySqlDbType.Datetime, typeof(DateTime) } }; + }; } } \ No newline at end of file