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()); }
public ChargeById(string id) { this.Id = ChargeId.With(Guid.Parse(id)).Value; }