Пример #1
0
        public async Task <ReRouteDto> CreateAsync(ReRouteCreateDto input)
        {
            var reRoute = ObjectMapper.Map <ReRouteCreateDto, ReRoute>(input);

            ApplyReRouteOptions(reRoute, input);

            reRoute = await _reRouteRepository.InsertAsync(reRoute, true);

            var reRouteDto = ObjectMapper.Map <ReRoute, ReRouteDto>(reRoute);

            await DistributedEventBus.PublishAsync(new ApigatewayConfigChangeEventData(reRoute.AppId, "ReRoute", "Create"));

            return(reRouteDto);
        }
Пример #2
0
        public async Task <ReRouteDto> CreateAsync(ReRouteCreateDto routeCreateDto)
        {
            var reRoute = ObjectMapper.Map <ReRouteCreateDto, ReRoute>(routeCreateDto);

            ApplyReRouteOptions(reRoute, routeCreateDto);

            reRoute = await _reRouteRepository.InsertAsync(reRoute, true);

            var reRouteDto = ObjectMapper.Map <ReRoute, ReRouteDto>(reRoute);

            await _eventPublisher.PublishAsync(ApigatewayConfigChangeCommand.EventName, new ApigatewayConfigChangeCommand("ReRoute", "Create"));

            return(reRouteDto);
        }
 public async Task <ReRouteDto> CreateAsync(ReRouteCreateDto input)
 {
     return(await ReRouteAppService.CreateAsync(input));
 }
 public async Task <ReRouteDto> CreateAsync(ReRouteCreateDto routeCreateDto)
 {
     return(await ReRouteAppService.CreateAsync(routeCreateDto));
 }