Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 public OperationMaker(IOperationMakerThroughDb operationMakerThroughDb, ICommitableQueryRunner commitableQueryRunner)
 {
     _operationMakerThroughDb = operationMakerThroughDb;
     _commitableQueryRunner   = commitableQueryRunner;
 }