예제 #1
0
        public ICollection <Product> GetAllProducts()
        {
            List <BLL.Models.Product> list = new List <BLL.Models.Product>();

            foreach (var item in _dal.GetAllProducts())
            {
                var product = new BLL.Models.Product
                {
                    Id             = item.Id,
                    CategoryId     = item.CategoryId,
                    ManufacturerId = item.ManufacturerId,
                    Name           = item.Name,
                    Description    = item.Description,
                    Price          = item.Price,
                    Keywords       = item.Keywords,
                    Quantity       = item.Quantity
                };
                list.Add(product);
            }
            return(list);
        }