public static InstallationCreateCommand FromResponse(GetInstallationsNearestResponse response) => InstallationCreateCommand.Create( response.Id, response.Airly, LocationAdapter.FromResponse(response), AddressAdapter.FromResponse(response.Address), SponsorAdapter.FromResponse(response.Sponsor));
public Either <InstallationError, InstallationDto> CreateInstallation(InstallationCreateCommand command) { return(TracedOperation.CallSync ( _logger, InstallationOperationType.CreateInstallation, command, () => _repository.TrySave(command.ToDomain()) .Map(InstallationDto.FromDomain) .ToEither(InstallationError.DuplicateExternalId(command.ExternalId)) )); }
public Either <InstallationError, InstallationDto> CreateInstallation(InstallationCreateCommand command) => _RunIntegration(_installationCore.CreateInstallation(command));
public Either <InstallationError, InstallationDto> CreateInstallation(InstallationCreateCommand command) => _core.CreateInstallation(command);