Commit 1367853f authored by Alex Wiese's avatar Alex Wiese Committed by Nick Craver

Update SqlMapperExtensions.Async.cs

Use adapter to format column name equals, bringing it in line with `Delete` behaviour.
parent 271af11b
...@@ -312,10 +312,12 @@ public static partial class SqlMapperExtensions ...@@ -312,10 +312,12 @@ public static partial class SqlMapperExtensions
var sb = new StringBuilder(); var sb = new StringBuilder();
sb.AppendFormat("DELETE FROM {0} WHERE ", name); sb.AppendFormat("DELETE FROM {0} WHERE ", name);
var adapter = GetFormatter(connection);
for (var i = 0; i < keyProperties.Count; i++) for (var i = 0; i < keyProperties.Count; i++)
{ {
var property = keyProperties[i]; var property = keyProperties[i];
sb.AppendFormat("{0} = @{1}", property.Name, property.Name); adapter.AppendColumnNameEqualsValue(sb, property.Name);
if (i < keyProperties.Count - 1) if (i < keyProperties.Count - 1)
sb.Append(" AND "); sb.Append(" AND ");
} }
......
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