Example #1
0
        public virtual async Task <RouteGroupDto> UpdateAsync(RouteGroupUpdateDto routerUpdateDto)
        {
            var router = await RouterRepository.GetByAppIdAsync(routerUpdateDto.AppId);

            router.Name        = routerUpdateDto.Name;
            router.IsActive    = routerUpdateDto.IsActive;
            router.Description = routerUpdateDto.Description;

            return(ObjectMapper.Map <RouteGroup, RouteGroupDto>(router));
        }
Example #2
0
        public virtual async Task <RouteGroupDto> UpdateAsync(RouteGroupUpdateDto routerUpdateDto)
        {
            var router = await RouterRepository.GetByAppIdAsync(routerUpdateDto.AppId);

            router.Name        = routerUpdateDto.Name;
            router.IsActive    = routerUpdateDto.IsActive;
            router.Description = routerUpdateDto.Description;
            router.SwitchApp(routerUpdateDto.AppName, routerUpdateDto.AppIpAddress);

            await RouterRepository.UpdateAsync(router);

            await CurrentUnitOfWork.SaveChangesAsync();

            return(ObjectMapper.Map <RouteGroup, RouteGroupDto>(router));
        }
Example #3
0
 public virtual async Task <RouteGroupDto> UpdateAsync(RouteGroupUpdateDto input)
 {
     return(await RouterAppService.UpdateAsync(input));
 }