Example #1
0
 public static SProcResult <T> QuerySProc <T>(this DbConnection db, Action <SProcInput> input)
 {
     return(HandleProc(db, input, cmd =>
     {
         var r = new SProcResult <T>();
         r.Result = cmd.Fetch <T>();
         return r;
     }) as SProcResult <T>);
 }
Example #2
0
        public static async Task <SProcResult <T> > QuerySProcAsync <T>(this DbConnection db, Action <SProcInput> input, CancellationToken cancel)
        {
            var res = await HandleProcAsync(db, input, async cmd =>
            {
                var r    = new SProcResult <T>();
                r.Result = await cmd.FetchAsync <T>(cancel).ConfigureAwait(false);
                return(r);
            });

            return(res as SProcResult <T>);
        }