Skip to content

Commit

Permalink
Merge pull request #298 from Tewr/master
Browse files Browse the repository at this point in the history
Brackets around property names in Update & Delete
  • Loading branch information
johandanforth committed Jun 9, 2015
2 parents c8ca11e + c625042 commit 6170b55
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Dapper.Contrib/SqlMapperExtensions.cs
Expand Up @@ -345,15 +345,15 @@ private static string GetTableName(Type type)
for (var i = 0; i < nonIdProps.Count(); i++)
{
var property = nonIdProps.ElementAt(i);
sb.AppendFormat("{0} = @{1}", property.Name, property.Name);
sb.AppendFormat("[{0}] = @{1}", property.Name, property.Name);
if (i < nonIdProps.Count() - 1)
sb.AppendFormat(", ");
}
sb.Append(" where ");
for (var i = 0; i < keyProperties.Count(); i++)
{
var property = keyProperties.ElementAt(i);
sb.AppendFormat("{0} = @{1}", property.Name, property.Name);
sb.AppendFormat("[{0}] = @{1}", property.Name, property.Name);
if (i < keyProperties.Count() - 1)
sb.AppendFormat(" and ");
}
Expand Down Expand Up @@ -390,7 +390,7 @@ private static string GetTableName(Type type)
for (var i = 0; i < keyProperties.Count(); i++)
{
var property = keyProperties.ElementAt(i);
sb.AppendFormat("{0} = @{1}", property.Name, property.Name);
sb.AppendFormat("[{0}] = @{1}", property.Name, property.Name);
if (i < keyProperties.Count() - 1)
sb.AppendFormat(" and ");
}
Expand Down

0 comments on commit 6170b55

Please sign in to comment.