/// <summary>
        /// Converts this instance of <see cref="RouteItem"/> to an instance of <see cref="RouteItemDTO"/>.
        /// </summary>
        /// <param name="entity"><see cref="RouteItem"/> to convert.</param>
        public static RouteItemDTO ToDTO(this RouteItem entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var dto = new RouteItemDTO();

            dto.Id                  = entity.Id;
            dto.ModuleType          = entity.ModuleType;
            dto.OverrideModuleType  = entity.OverrideModuleType;
            dto.Index               = entity.Index;
            dto.ForceModuleInstance = entity.ForceModuleInstance;
            dto.ForbiddenModuleType = entity.ForbiddenModuleType;

            return(dto);
        }
        /// <summary>
        /// Converts this instance of <see cref="RouteItemDTO"/> to an instance of <see cref="RouteItem"/>.
        /// </summary>
        /// <param name="dto"><see cref="RouteItemDTO"/> to convert.</param>
        public static RouteItem ToEntity(this RouteItemDTO dto)
        {
            if (dto == null)
            {
                return(null);
            }

            var entity = new RouteItem();

            entity.Id                  = dto.Id;
            entity.ModuleType          = dto.ModuleType;
            entity.OverrideModuleType  = dto.OverrideModuleType;
            entity.Index               = dto.Index;
            entity.ForceModuleInstance = dto.ForceModuleInstance;
            entity.ForbiddenModuleType = dto.ForbiddenModuleType;

            return(entity);
        }