Exemple #1
0
        public async Task <IEnumerable <ItemCategoryReadModel> > HandleAsync(AllActiveItemCategoriesQuery query, CancellationToken cancellationToken)
        {
            if (query is null)
            {
                throw new ArgumentNullException(nameof(query));
            }

            var results = await itemCategoryRepository.FindActiveByAsync(cancellationToken);

            return(results.Select(r => r.ToReadModel()));
        }