Esempio n. 1
0
 public ICollection <Product> SelectAll()
 {
     if (serializer != null)
     {
         products = serializer.ReadProducts();
     }
     return(products);
 }
        public CollectionProductModel(IProductSerializer serializer)
        {
            this.serializer = serializer;
            ICollection <Product> productCollection = serializer.ReadProducts();

            if (productCollection != null)
            {
                products = new HashSet <Product>(productCollection);
            }
        }