using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace MWR.C3.WebController.Models { public class GatewayViewModel : AgentViewModel { public ICollection Relays { get; set; } public ICollection Connectors { get; set; } public GatewayViewModel(Gateway g): base(g, g.Build?.Name) { Connectors = g.Connectors; Relays = g.Relays?.Select(r => new RelayViewModel(r)).ToList(); } } }