diff --git a/RepoDb.Core/RepoDb/Extensions/DbCommandExtension.cs b/RepoDb.Core/RepoDb/Extensions/DbCommandExtension.cs index 05abc8043..9b49fd7f2 100644 --- a/RepoDb.Core/RepoDb/Extensions/DbCommandExtension.cs +++ b/RepoDb.Core/RepoDb/Extensions/DbCommandExtension.cs @@ -844,21 +844,21 @@ private static DbField GetDbField(string fieldName, DbFieldCollection dbFields) { if (dbFields is null || dbFields.IsEmpty()) return null; - + var fieldNameSpan = fieldName.AsSpan(); - + if (fieldNameSpan.IsEmpty || fieldNameSpan.IsWhiteSpace()) { return null; } - + var index = fieldNameSpan.IndexOf("_In_".AsSpan(), StringComparison.OrdinalIgnoreCase); if (index >= 0) { fieldNameSpan = fieldNameSpan.Slice(0, index); } - + return dbFields.GetByName(fieldNameSpan.ToString()); } @@ -887,7 +887,7 @@ private static object AutomaticConvert(object value, } else { - return Convert.ChangeType(value, targetType); + return (value != DBNull.Value) ? Convert.ChangeType(value, targetType) : Activator.CreateInstance(targetType); } } diff --git a/RepoDb.Core/RepoDb/Operations/DbConnection/Merge.cs b/RepoDb.Core/RepoDb/Operations/DbConnection/Merge.cs index b0091da36..b55789c83 100644 --- a/RepoDb.Core/RepoDb/Operations/DbConnection/Merge.cs +++ b/RepoDb.Core/RepoDb/Operations/DbConnection/Merge.cs @@ -721,7 +721,7 @@ internal static TResult MergeInternal(this IDbConnection conne fields: GetQualifiedFields(fields, entity), hints: hints, commandTimeout: commandTimeout, - traceKey: traceKey, + traceKey: traceKey, transaction: transaction, trace: trace, statementBuilder: statementBuilder); @@ -735,7 +735,7 @@ internal static TResult MergeInternal(this IDbConnection conne fields: GetQualifiedFields(fields, entity), hints: hints, commandTimeout: commandTimeout, - traceKey: traceKey, + traceKey: traceKey, transaction: transaction, trace: trace, statementBuilder: statementBuilder); @@ -752,7 +752,7 @@ internal static TResult MergeInternal(this IDbConnection conne fields: GetQualifiedFields(fields, entity), hints: hints, commandTimeout: commandTimeout, - traceKey: traceKey, + traceKey: traceKey, transaction: transaction, trace: trace, statementBuilder: statementBuilder); @@ -766,7 +766,7 @@ internal static TResult MergeInternal(this IDbConnection conne fields: GetQualifiedFields(fields, entity), hints: hints, commandTimeout: commandTimeout, - traceKey: traceKey, + traceKey: traceKey, transaction: transaction, trace: trace, statementBuilder: statementBuilder); diff --git a/RepoDb.MySql/RepoDb.MySql.IntegrationTests/appveyor.yml b/RepoDb.MySql/RepoDb.MySql.IntegrationTests/appveyor.yml deleted file mode 100644 index 1fc73a30e..000000000 --- a/RepoDb.MySql/RepoDb.MySql.IntegrationTests/appveyor.yml +++ /dev/null @@ -1,11 +0,0 @@ -version: 1.0.{build} -image: Visual Studio 2017 -configuration: Release -platform: Any CPU -before_build: -- cmd: dotnet restore RepoDb.MySql\RepoDb.MySql.IntegrationTests\RepoDb.MySql.IntegrationTests.csproj -build: - project: RepoDb.MySql\RepoDb.MySql.IntegrationTests\RepoDb.MySql.IntegrationTests.csproj - verbosity: normal -services: - - mssql2017 \ No newline at end of file diff --git a/RepoDb.MySql/RepoDb.MySql/StatementBuilders/MySqlStatementBuilder.cs b/RepoDb.MySql/RepoDb.MySql/StatementBuilders/MySqlStatementBuilder.cs index 584241a2f..4671883ce 100644 --- a/RepoDb.MySql/RepoDb.MySql/StatementBuilders/MySqlStatementBuilder.cs +++ b/RepoDb.MySql/RepoDb.MySql/StatementBuilders/MySqlStatementBuilder.cs @@ -610,7 +610,7 @@ public override string CreateQuery(string tableName, /// The name of the target table. /// The mapping list of objects to be used. /// The number of rows to skip. - /// The number of rows per batch. + /// The number of rows to take. /// The list of fields for ordering. /// The query expression. /// The table hints to be used. diff --git a/RepoDb.MySqlConnector/RepoDb.MySqlConnector/StatementBuilders/MySqlConnectorStatementBuilder.cs b/RepoDb.MySqlConnector/RepoDb.MySqlConnector/StatementBuilders/MySqlConnectorStatementBuilder.cs index 24726b647..cba042704 100644 --- a/RepoDb.MySqlConnector/RepoDb.MySqlConnector/StatementBuilders/MySqlConnectorStatementBuilder.cs +++ b/RepoDb.MySqlConnector/RepoDb.MySqlConnector/StatementBuilders/MySqlConnectorStatementBuilder.cs @@ -608,8 +608,8 @@ public override string CreateQuery(string tableName, /// /// The name of the target table. /// The list of fields to be queried. - /// The page of the batch. - /// The number of rows per batch. + /// The number of rows to skip. + /// The number of rows to take. /// The list of fields for ordering. /// The query expression. /// The table hints to be used.