public static async Task <T> RunAsync <T>(this IReadonlyQueryRunner readonlyQueryRunner, Func <IConnection, Task <T> > query)
        {
            var result = default(T);
            await readonlyQueryRunner.RunAsync(async connection => {
                result = await query(connection);
            });

            return(result);
        }
Ejemplo n.º 2
0
 public SomeDataProvider(IReadonlyQueryRunner readonlyQueryRunner, ISomeDataProviderThroughDb someDataProviderThroughDb)
 {
     _readonlyQueryRunner       = readonlyQueryRunner;
     _someDataProviderThroughDb = someDataProviderThroughDb;
 }