Class SyncExpressiveExtensions
- Namespace
- Open.Database.Extensions.Synchronous
- Assembly
- Open.Database.Extensions.Core.dll
Blocking calls on a command or a query definition that has a command
(Command, StoredProcedure, Using(...)), which hold the calling thread until the work is done.
public static class SyncExpressiveExtensions
- Inheritance
-
SyncExpressiveExtensions
- Inherited Members
Remarks
Add using Open.Database.Extensions.Synchronous; to use them.
A command that does not support blocking calls throws NotSupportedException; use the async call.
Methods
- Execute(IExecuteCommand, Action<IDbCommand>)
Executes the command and passes it to the handler.
- ExecuteNonQuery(IExecuteCommand)
Executes the command with ExecuteNonQuery().
- ExecuteReader(IExecuteReader, Action<IDataReader>, CommandBehavior)
Executes a reader and passes it to the handler.
- ExecuteReader<T>(IExecuteReader, Func<IDataReader, T>, CommandBehavior)
Executes a reader, passes it to the transform and returns the result.
- ExecuteReader<TReader>(IExecuteReader<TReader>, Action<TReader>, CommandBehavior)
Executes a reader and passes it to the handler.
- ExecuteReader<TState, TResult>(IExecuteReader, TState, Func<IDataReader, TState, TResult>, CommandBehavior)
Executes a reader, passes it and a state to the transform and returns the result.
- ExecuteReader<TReader, T>(IExecuteReader<TReader>, Func<TReader, T>, CommandBehavior)
Executes a reader, passes it to the transform and returns the result.
- ExecuteReturn(IExecuteCommand)
Executes the command with a return parameter, as ExecuteNonQuery() does, and returns the value of that parameter.
- ExecuteReturn<T>(IExecuteCommand)
Executes the command with a return parameter, as ExecuteNonQuery() does, and returns the value of that parameter converted to
T.
- ExecuteScalar(IExecuteCommand)
Executes the command with ExecuteScalar().
- ExecuteScalar<T>(IExecuteCommand)
Executes the command with ExecuteScalar() and converts the value to the expected type, as
Map<T>()converts a column.
- ExecuteScalar<T>(IExecuteCommand, Func<object?, T>)
Executes the command with ExecuteScalar() and passes the value to a transform.
- Execute<T>(IExecuteCommand, Func<IDbCommand, T>)
Executes the command, passes it to the transform and returns the result.
- Execute<TCommand>(IExecuteCommand<TCommand>, Action<TCommand>)
Executes the command and passes it to the handler.
- Execute<TCommand, T>(IExecuteCommand<TCommand>, Func<TCommand, T>)
Executes the command, passes it to the transform and returns the result.