Skip to content

Commit

Permalink
more values
Browse files Browse the repository at this point in the history
  • Loading branch information
EvilLord666 committed May 10, 2022
1 parent d169ad3 commit 89ff7da
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions DbTools/DbTools.Simple/Factories/DbParameterFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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[])},
Expand All @@ -104,7 +104,20 @@ private static object MapMySqlParameterValue(MySqlDbType type, object value)

private static readonly IDictionary<MySqlDbType, Type> MySqlTypesMapping = new Dictionary<MySqlDbType, Type>()
{
{ 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) }
};
};
}
}

0 comments on commit 89ff7da

Please sign in to comment.