Пример #1
0
 public To_Buy CreateProduct_Buy(string name) //Create new entry in the list of things to buy.
 {
     using (var db = new ScanContext())
     {
         var buy = new To_Buy {
             Name = name
         };
         db.To_Buy.Add(buy);
         db.SaveChanges();
         return(buy);
     }
 }
Пример #2
0
 public To_Buy CreateProduct_Buy(string name)
 {
     using (var db = new ScanContext())
     {
         var buy = new To_Buy {
             Name = name
         };
         db.To_Buy.Add(buy);
         db.SaveChanges();
         return(buy);
     }
 }