public static GuiChannel ConvertChannel(Channel c) { GuiChannel chan = new GuiChannel() { Id = c.Id, Description = c.Description, Plays = c.Hits != null ? c.Hits.Value : 0, Name = c.Name, StreamUri = c.StreamUri, OwnerId = c.OwnerId, }; using (RentItServiceClient proxy = new RentItServiceClient()) { //Get number of subscribers chan.Subscribers = proxy.GetSubscriberCount(chan.Id); //Get the channels chan.Tracks = ConvertTracks(proxy.GetTrackByChannelId(c.Id)); //Get the genres chan.Genres = ConvertGenres(proxy.GetGenresForChannel(c.Id)); } return chan; }