Skip to content

Commit 375f930

Browse files
committed
Simplify expression.
1 parent 78e9744 commit 375f930

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/MySqlConnector/Core/ServerSession.cs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -235,15 +235,8 @@ public async Task PrepareAsync(IMySqlCommand command, IOBehavior ioBehavior, Can
235235
m_preparedStatements.Add(commandText, new(preparedStatements, parsedStatements));
236236
}
237237

238-
public PreparedStatements? TryGetPreparedStatement(string commandText)
239-
{
240-
if (m_preparedStatements is not null)
241-
{
242-
if (m_preparedStatements.TryGetValue(commandText, out var statement))
243-
return statement;
244-
}
245-
return null;
246-
}
238+
public PreparedStatements? TryGetPreparedStatement(string commandText) =>
239+
m_preparedStatements is not null && m_preparedStatements.TryGetValue(commandText, out var statement) ? statement : null;
247240

248241
public void StartQuerying(ICancellableCommand command)
249242
{

0 commit comments

Comments
 (0)