예제 #1
0
        public static Task <IEnumerable <DbCommandResult> > ExecuteAsync(this RoscoeDb db, CancellationToken token = default, params IWrapper <IRoscoeCommand>[] commands)
        {
            Check.IsNotNull(db, nameof(db));
            Check.IsNotNull(commands, nameof(commands));

            return(db.ExecuteAsync(token, commands.Select(x => x.Value).ToArray()));
        }
예제 #2
0
        public static async Task <T> ExecuteAsync <T>(this RoscoeDb db, RoscoeCommand <T> command, CancellationToken token = default)
        {
            Check.IsNotNull(db, nameof(db));
            Check.IsNotNull(command, nameof(command));

            var result = await db.ExecuteAsync(token, new[] { command });

            return(command.Convert(result.First()));
        }
예제 #3
0
 this RoscoeDb db,
 IWrapper <RoscoeCommand <T1> > command1,
 IWrapper <RoscoeCommand <T2> > command2,
 CancellationToken token = default) =>
예제 #4
0
 public static Task <T> ExecuteAsync <T>(this RoscoeDb db, IWrapper <RoscoeCommand <T> > command, CancellationToken token = default) =>
 db.ExecuteAsync(command.Value, token);