public async Task <ChannelEntity> GetChannelMetadata(string channelId) { using (var uow = this.CreateWithDisabledLazyLoading()) { var channelsRep = uow.GetRepository <ChannelEntity>(); return(await ChannelsMapper.MapToChannelMetadata( channelsRep.GetAll(), channelId)); } }
private async void LoadChannel() { IsBusy = true; try { IEnumerable <ChannelModel> chanels = await _wrapper.WrappChannelsAsync(); if (chanels != null) { ChannelsList = await ChannelsMapper.Map(chanels); ChannelViewList = CollectionViewSource.GetDefaultView(ChannelsList); var groups = chanels.GroupBy(x => x.GroupName).Select(y => y.Key.ToString()).ToList(); foreach (var group in groups) { ChannelsGroup.Add(group); } } } finally { IsBusy = false; } }