public void SetChannels(List<ChannelDto> channels) { foreach (var channel in channels) { var query = new ChannelsQuery(channel.Id); _channelQueryHandler.CreateOrUpdateValueById<ChannelDto>(query, channel); } SetChannelsIds(new ChannelIdsDto {Ids = channels.Select(x => x.Id).ToList()}); }
public async Task <List <Channel> > GetAvailableChatChannelsAsync() { var channels = await Task.Run(async() => { var channelsQuery = new ChannelsQuery(_connection); var result = await channelsQuery.ExecuteAsync(); return(result); }); return(channels); }
public void SetChannel(ChannelDto channel) { var query = new ChannelsQuery(channel.Id); _channelQueryHandler.CreateOrUpdateValueById<ChannelDto>(query, channel); }
public List<ChannelDto> GetChannels(List<string> ids) { var query = new ChannelsQuery(ids); return _channelQueryHandler.GetValuesByIds(query); }
public ChannelDto GetChannel(string id) { var query = new ChannelsQuery(id); return _channelQueryHandler.GetValueById(query); }