Пример #1
0
        public async Task ExecuteAsync()
        {
            var items = await GetValuesQuery.ExecuteAsync();

            var itemsToUpdate = items.Select((Value, Index) => new { Index, Value })
                                .Where(x => (x.Index % 2) != 0)
                                .Select(x => x.Value);

            foreach (Item item in itemsToUpdate)
            {
                await CommandsDispatcher.ExecuteAsync(new UpdateItemCommand(item.Id, item.Value?.ToLowerInvariant()));
            }
        }
        public async Task <IEnumerable <Item> > Get(string filter = null)
        {
            var result = await GetValuesQuery.ExecuteAsync(filter);

            return(result);
        }