Skip to content

Commit

Permalink
! Missing suffix usage
Browse files Browse the repository at this point in the history
  • Loading branch information
artiomchi committed Sep 11, 2018
1 parent d185d9c commit 4c314d5
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public abstract class RelationalUpsertCommandRunner : UpsertCommandRunnerBase
protected abstract string SourcePrefix { get; }
protected virtual string SourceSuffix => null;
protected abstract string TargetPrefix { get; }
protected virtual string TargetSuffix => null;

private (string SqlCommand, IEnumerable<object> Arguments) PrepareCommand<TEntity>(IEntityType entityType, ICollection<TEntity> entities,
Expression<Func<TEntity, object>> match, Expression<Func<TEntity, TEntity>> updater)
Expand Down Expand Up @@ -86,7 +87,8 @@ private string ExpandValue(IKnownValue value)
{
case ExpressionParameterProperty prop:
var prefix = prop.IsLeftParameter ? TargetPrefix : SourcePrefix;
return prefix + Column(prop.Property.Relational().ColumnName);
var suffix = prop.IsLeftParameter ? TargetSuffix : SourceSuffix;
return prefix + Column(prop.Property.Relational().ColumnName) + suffix;

case ConstantValue constVal:
return Parameter(constVal.ParameterIndex);
Expand Down

0 comments on commit 4c314d5

Please sign in to comment.