public virtual async Task <AggregateReRouteDto> GetAsync(AggregateRouteGetByRouteIdInputDto input)
        {
            var routeId = long.Parse(input.RouteId);
            var reroute = await _aggregateReRouteRepository.GetByRouteIdAsync(routeId);

            return(ObjectMapper.Map <AggregateReRoute, AggregateReRouteDto>(reroute));
        }
        public virtual async Task DeleteAsync(AggregateRouteGetByRouteIdInputDto input)
        {
            var routeId        = long.Parse(input.RouteId);
            var aggregateRoute = await _aggregateReRouteRepository.GetByRouteIdAsync(routeId);

            await _aggregateReRouteRepository.DeleteAsync(aggregateRoute);

            await DistributedEventBus.PublishAsync(new ApigatewayConfigChangeEventData(aggregateRoute.AppId, "AggregateRoute", "Delete"));
        }
Пример #3
0
        public virtual async Task DeleteAsync(AggregateRouteGetByRouteIdInputDto aggregateRouteGetByRouteId)
        {
            var routeId        = long.Parse(aggregateRouteGetByRouteId.RouteId);
            var aggregateRoute = await _aggregateReRouteRepository.GetByRouteIdAsync(routeId);

            await _aggregateReRouteRepository.DeleteAsync(aggregateRoute);

            await _eventPublisher.PublishAsync(ApigatewayConfigChangeCommand.EventName,
                                               new ApigatewayConfigChangeCommand("AggregateRoute", "Delete"));
        }
Пример #4
0
 public async Task DeleteAsync(AggregateRouteGetByRouteIdInputDto aggregateRouteGetByRouteId)
 {
     await AggregateReRouteAppService.DeleteAsync(aggregateRouteGetByRouteId);
 }
Пример #5
0
 public async Task <AggregateReRouteDto> GetAsync(AggregateRouteGetByRouteIdInputDto aggregateRouteGetByRouteId)
 {
     return(await AggregateReRouteAppService.GetAsync(aggregateRouteGetByRouteId));
 }