Esempio n. 1
0
 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());
 }
Esempio n. 2
0
 public IEnumerable <Product> Handle(ListProductQuery message)
 {
     return(_session.QueryOver <Product>().List());
 }