/// <summary>
        /// ПОЗАБОТИТСЯ ОБ ОБРАБОТКЕ ИСКЛЮЧЕНИЙ. (StorageHandlerException, OptionHandlerException, Exception)
        /// </summary>
        /// <param name="deviceName"></param>
        /// <returns></returns>
        /// <exception cref="StorageHandlerException"></exception>
        /// <exception cref="OptionHandlerException"></exception>
        /// <exception cref="Exception"></exception>
        public async Task <Device <TIn> > BuildDevice(string deviceName)
        {
            if (!await _mediatorForOptionsRep.IsExistDeviceAsync(deviceName))
            {
                return(null);
            }
            var optionAgregator = await _mediatorForOptionsRep.GetOptionAgregatorForDeviceAsync(deviceName);

            var newDevice = _mediatorForStorages.BuildAndAddDevice(optionAgregator);

            return(newDevice);
        }
        public async Task <IActionResult> Get([FromRoute] string deviceName)
        {
            try
            {
                if (!await _mediatorForOptionsRep.IsExistDeviceAsync(deviceName))
                {
                    return(NotFound(deviceName));
                }
                var optionAgregator = await _mediatorForOptionsRep.GetOptionAgregatorForDeviceAsync(deviceName);

                var agregatorOptionDto = _mapper.Map <OptionAgregatorDto>(optionAgregator);
                return(new JsonResult(agregatorOptionDto));
            }
            catch (Exception ex)
            {
                _logger.Error(ex, "Ошибка в DevicesOptionController/Get");
                throw;
            }
        }