Commit fc38c423 authored by Sergey's avatar Sergey Committed by Nick Craver

Removing unjustified use of AppendFormat in StringBuilder class (#989)

parent 6e9099d6
......@@ -246,7 +246,7 @@ public static partial class SqlMapperExtensions
var property = nonIdProps[i];
adapter.AppendColumnNameEqualsValue(sb, property.Name);
if (i < nonIdProps.Count - 1)
sb.AppendFormat(", ");
sb.Append(", ");
}
sb.Append(" where ");
for (var i = 0; i < keyProperties.Count; i++)
......@@ -254,7 +254,7 @@ public static partial class SqlMapperExtensions
var property = keyProperties[i];
adapter.AppendColumnNameEqualsValue(sb, property.Name);
if (i < keyProperties.Count - 1)
sb.AppendFormat(" and ");
sb.Append(" and ");
}
var updated = await connection.ExecuteAsync(sb.ToString(), entityToUpdate, commandTimeout: commandTimeout, transaction: transaction).ConfigureAwait(false);
return updated > 0;
......@@ -301,7 +301,7 @@ public static partial class SqlMapperExtensions
var property = keyProperties[i];
sb.AppendFormat("{0} = @{1}", property.Name, property.Name);
if (i < keyProperties.Count - 1)
sb.AppendFormat(" AND ");
sb.Append(" AND ");
}
var deleted = await connection.ExecuteAsync(sb.ToString(), entityToDelete, transaction, commandTimeout).ConfigureAwait(false);
return deleted > 0;
......
......@@ -440,7 +440,7 @@ private static string GetTableName(Type type)
var property = nonIdProps[i];
adapter.AppendColumnNameEqualsValue(sb, property.Name); //fix for issue #336
if (i < nonIdProps.Count - 1)
sb.AppendFormat(", ");
sb.Append(", ");
}
sb.Append(" where ");
for (var i = 0; i < keyProperties.Count; i++)
......@@ -448,7 +448,7 @@ private static string GetTableName(Type type)
var property = keyProperties[i];
adapter.AppendColumnNameEqualsValue(sb, property.Name); //fix for issue #336
if (i < keyProperties.Count - 1)
sb.AppendFormat(" and ");
sb.Append(" and ");
}
var updated = connection.Execute(sb.ToString(), entityToUpdate, commandTimeout: commandTimeout, transaction: transaction);
return updated > 0;
......@@ -497,7 +497,7 @@ private static string GetTableName(Type type)
var property = keyProperties[i];
adapter.AppendColumnNameEqualsValue(sb, property.Name); //fix for issue #336
if (i < keyProperties.Count - 1)
sb.AppendFormat(" and ");
sb.Append(" and ");
}
var deleted = connection.Execute(sb.ToString(), entityToDelete, transaction, commandTimeout);
return deleted > 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment