You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vartypeDecimal=AddDbTypeMapping(new(typeof(decimal),new[]{DbType.Decimal,DbType.Currency,DbType.VarNumeric},convert:static o =>Convert.ToDecimal(o)));
49
-
vartypeDouble=AddDbTypeMapping(new(typeof(double),new[]{DbType.Double},convert:static o =>Convert.ToDouble(o)));
50
-
vartypeFloat=AddDbTypeMapping(new(typeof(float),new[]{DbType.Single},convert:static o =>Convert.ToSingle(o)));
49
+
vartypeDecimal=AddDbTypeMapping(new(typeof(decimal),new[]{DbType.Decimal,DbType.Currency,DbType.VarNumeric},convert:static o =>Convert.ToDecimal(o,CultureInfo.InvariantCulture)));
50
+
vartypeDouble=AddDbTypeMapping(new(typeof(double),new[]{DbType.Double},convert:static o =>Convert.ToDouble(o,CultureInfo.InvariantCulture)));
51
+
vartypeFloat=AddDbTypeMapping(new(typeof(float),new[]{DbType.Single},convert:static o =>Convert.ToSingle(o,CultureInfo.InvariantCulture)));
vartypeTime=AddDbTypeMapping(new(typeof(TimeSpan),new[]{DbType.Time},convert:static o =>oisstrings?Utility.ParseTimeSpan(Encoding.UTF8.GetBytes(s)):Convert.ChangeType(o,typeof(TimeSpan))));
101
+
vartypeTime=AddDbTypeMapping(new(typeof(TimeSpan),new[]{DbType.Time},convert:static o =>oisstrings?Utility.ParseTimeSpan(Encoding.UTF8.GetBytes(s)):Convert.ChangeType(o,typeof(TimeSpan),CultureInfo.InvariantCulture)));
Copy file name to clipboardExpand all lines: src/MySqlConnector/MySqlAttribute.cs
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,9 @@ namespace MySqlConnector
4
4
/// <see cref="MySqlAttribute"/> represents an attribute that can be sent with a MySQL query.
5
5
/// </summary>
6
6
/// <remarks>See <a href="https://dev.mysql.com/doc/refman/8.0/en/query-attributes.html">Query Attributes</a> for information on using query attributes.</remarks>
7
+
#pragma warning disable CA1711// Identifiers should not have incorrect suffix
7
8
publicsealedclassMySqlAttribute
9
+
#pragma warning restore CA1711// Identifiers should not have incorrect suffix
8
10
{
9
11
/// <summary>
10
12
/// Initializes a new <see cref="MySqlAttribute"/>.
0 commit comments