Skip to content

Commit 18a1755

Browse files
committed
Code optimization
1 parent dabbaf5 commit 18a1755

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Sql/ParameterCollection.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ public Parameter this[string name] {
5252
/// </summary>
5353
/// <param name="array">The array whose elements are copied to the parameter list.</param>
5454
/// <returns>The parameter list corresponding to the specified array of positional parameters.</returns>
55-
public static implicit operator ParameterCollection(object?[] array) => [.. array.Index().Select(entry =>
56-
entry.Item is Parameter parameter ? parameter : new Parameter($"?{entry.Index + 1}", entry.Item)
55+
public static implicit operator ParameterCollection(object?[] array) => [.. array.Select((value, index) =>
56+
value is Parameter parameter ? parameter : new Parameter($"?{index + 1}", value)
5757
)];
5858

5959
/// <summary>

0 commit comments

Comments
 (0)