public async Task <IServiceResult> SaveAsync(LocalPhone phone, Guid addressUuid) { try { if (!await _addressRepository.CheckExistenceAsync(addressUuid)) { return(new NotFoundResult()); } var address = await _addressRepository.GetAsync(addressUuid); phone.PhoneAddressId = address.Id; var phoneUuid = await _localPhoneRepository.SaveAsync(phone); if (phoneUuid == default) { return(new NotFoundResult()); } return(new SuccessResult <Guid>(phoneUuid)); } catch (Exception e) { _logger.LogError(e, "Error while saving local phone"); return(new FailResult()); } }