Exemplo n.º 1
0
        public async Task <CategoryDetailsQueryData> Handle(GetCategoryDetailsQuery request, CancellationToken cancellationToken)
        {
            var category = await dbContext.Categories
                           .FirstOrDefaultAsync(cat => cat.Id == request.Id);

            return(CategoryMapper.FromCategoryToCategoryDetailsQueryData(category));
        }