コード例 #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);