public static async Task <bool> RunAsync(this ICommitableQueryRunner commitableQueryRunner, Func <IConnection, Task <bool> > commitableQuery) { var result = default(bool); await commitableQueryRunner.RunAsync(async (connection, commiter) => { result = await commitableQuery(connection); if (result) { await commiter.CommitAsync(); } }); return(result); }
public OperationMaker(IOperationMakerThroughDb operationMakerThroughDb, ICommitableQueryRunner commitableQueryRunner) { _operationMakerThroughDb = operationMakerThroughDb; _commitableQueryRunner = commitableQueryRunner; }