Skip to content

Commit 11bf56d

Browse files
Refactor constructor in ExpressiveCommandBase
Updated the constructor of the `ExpressiveCommandBase<TConnection, TCommand, TRead>` class to use expression-bodied member syntax for a more concise assignment of the `Transaction` property.
1 parent 668c1ef commit 11bf56d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Source/Core/ExpressiveCommandBase.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,7 @@ protected ExpressiveCommandBase(
8484
string command,
8585
IEnumerable<Param>? @params)
8686
: this(DbConnectionProvider.Create(connection), type, command, @params)
87-
{
88-
Transaction = transaction;
89-
}
87+
=> Transaction = transaction;
9088

9189
/// <summary>Constructs a <see cref="ExpressiveCommandBase{TConnection, TCommand, TReader, TDbType, TThis}"/>.</summary>
9290
/// <param name="connection">The connection to execute the command on.</param>

0 commit comments

Comments
 (0)