public IEnumerable <ListProductResult> Handle(ListProductQuery query) { return(productRepository.List() .Select(p => new ListProductResult { Id = p.Id, Name = p.Name, BrandName = p.BrandName, Price = p.Price, Count = p.Count }) .ToList()); }
public IEnumerable <Product> Handle(ListProductQuery message) { return(_session.QueryOver <Product>().List()); }