public async Task <ActualizarSaldo> Save(ActualizarSaldo dto, Expression <Func <ActualizarSaldoCollection, bool> > exp = null) { var document = new ActualizarSaldoCollection { Cuenta = dto.Cuenta, Id = dto.Id, Saldo = dto.Saldo, Procesado = dto.Procesado }; if (await ExistBy(exp is null ? c => c.Id == document.Id : exp)) { await _mongoCollection.ReplaceOneAsync(exp is null?c => c.Id == document.Id : exp, document); }
// [CapSubscribe("ActualizarSaldo")] public async Task Handle(ActualizarSaldo request) { await _mongo.Save(request); _mediator.Recurring(new IntegrationService.Request(), Cron.Minutely()); }
public async Task <IActionResult> Send(ActualizarSaldo request) { await _bus.Send <ActualizarSaldo>(request); return(Ok()); }