示例#1
0
        ICollection <ProductImage> IService1.GetProductImagesByProduct(string productId)
        {
            List <ProductImage> list = new List <ProductImage>();

            foreach (var item in _bll.GetProductImagesByProduct(Int32.Parse(productId)))
            {
                ProductImage productImage = new ProductImage
                {
                    Id        = item.Id,
                    ProductId = item.ProductId,
                    Image     = item.Image
                };
                list.Add(productImage);
            }
            return(list.ToArray());
        }