private void AppendWhereCondition(TEntity entity) { Func <TEntity, string> getKeyMatch = MetadataResolver.GetPrimaryKeyMatchConditionFunc <TEntity>(); string condition = getKeyMatch(entity); _sqlBuilder.Append($"WHERE {condition}"); }