public IEnumerable <ProductViewModel> Exec() { return(_stockManager.GetProductsWithStock(x => new ProductViewModel { Id = x.Id, Description = x.Description, Stocks = x.Stocks.Select(y => new StockViewModel { Id = y.Id, Description = y.Description, Quantity = y.Quantity }) })); }