Ejemplo n.º 1
0
 public TobaccoController(LoungeContext context)
 {
     db = context;
     if (!db.Tobaccos.Any())
     {
         db.Tobaccos.Add(new Tobacco {
             Name = "Tom", Price = 300, Taste = "26", Description = "das is good", Image = @"https://tabaki.shop/content/images/16/kalyan-yahya-sy07-52435328452402.jpg", Weight = 23
         });;
         db.SaveChanges();
     }
 }
Ejemplo n.º 2
0
 public OrderController(LoungeContext context)
 {
     db = context;
     if (!db.Orders.Any())
     {
         db.Orders.Add(new Order {
             User = "******", Address = "NewAdress", ContactPhone = "newPhone"
         });
         db.SaveChanges();
     }
 }