Ejemplo n.º 1
0
        public ProductsSearchResultDto Handle(ProductSearchQuery query)
        {
            var result = _db.Find <SearchableProduct>(query.VinmonopoletId);

            if (result != null)
            {
                return(new ProductsSearchResultDto
                {
                    VinmonopoletId = result.Id,
                    Name = result.Name,
                    Vintage = result.Vintage,
                    Producer = result.Producer,
                    Fruit = result.Fruit,
                    Price = result.Price,
                    Country = result.Country,
                    ProductType = result.ProductType
                });
            }
            return(null);
        }