Esempio n. 1
0
        public async Task <IActionResult> ChargesByLocationAndUser([CustomizeValidator(Skip = true)][FromBody]
                                                                   CloseCharges model)
        {
            await Task.WhenAll(model.Charges.Select(async id =>
                                                    await this.commandBus
                                                    .PublishAsync(new CloseCharge(ChargeId.With(Guid.Parse(id))), CancellationToken.None)
                                                    .ConfigureAwait(false))).ConfigureAwait(false);

            return(this.Ok());
        }
Esempio n. 2
0
 public ChargeById(string id)
 {
     this.Id = ChargeId.With(Guid.Parse(id)).Value;
 }