public async Task <IActionResult> UpdateAsync([FromBody] EditLegalEntityModel model)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(new ErrorResponse().AddErrors(ModelState)));
            }

            try
            {
                var legalEntity = Mapper.Map <LegalEntity>(model);

                await _legalEntityService.UpdateAsync(legalEntity);
            }
            catch (LegalEntityNotFoundException exception)
            {
                await _log.WriteWarningAsync(nameof(LegalEntitiesController), nameof(UpdateAsync),
                                             model.ToJson(), exception.Message);

                return(NotFound());
            }

            return(NoContent());
        }
 public Task UpdateLegalEntityAsync(EditLegalEntityModel model, CancellationToken cancellationToken = default(CancellationToken))
 => _runner.RunAsync(() => _legalEntitiesApi.UpdateAsync(model, cancellationToken));