Beispiel #1
0
 public MyProductsRepository(int n)
 {
     using (ProductDataContext db = new ProductDataContext())
     {
         _myProductsList = new List <MyProduct>();
         List <Product> products = db.GetNProducts(n);
         foreach (Product product in products)
         {
             _myProductsList.Add(new MyProduct(product));
         }
     }
 }