Esempio n. 1
0
        public IList <Warehouse> GetAll(IQueryable <Warehouse> warehouse)
        {
            warehouse.ToList().ForEach(x =>
                                       x.StockCounts
                                       .ForEach(i =>
            {
                var existAccesory = _accesoryLogic.GetByPartNumber(i.ProductId);
                if (existAccesory == null)
                {
                    i.Product = _devicesLogic.GetBySku(i.ProductId);
                }
                else
                {
                    i.Product = existAccesory;
                }
            }));

            return(warehouse.ToList());
        }