Esempio n. 1
0
 public static void RemoveCategory(Category category)
 {
     using (ModelOfShop db = new ModelOfShop())
     {
         db.Categories.Remove(category);
         db.SaveChanges();
     }
 }
Esempio n. 2
0
 public static void RemoveBrand(Brand brand)
 {
     using (ModelOfShop db = new ModelOfShop())
     {
         db.Brands.Remove(brand);
         db.SaveChanges();
     }
 }
Esempio n. 3
0
 public static void AddCategory(params Category[] category)
 {
     using (ModelOfShop db = new ModelOfShop())
     {
         db.Categories.AddRange(category);
         db.SaveChanges();
     }
 }
Esempio n. 4
0
 public static void AddBrand(params Brand[] brand)
 {
     using (ModelOfShop db = new ModelOfShop())
     {
         db.Brands.AddRange(brand);
         db.SaveChanges();
     }
 }
Esempio n. 5
0
 public static void AddBrand(Brand brand)
 {
     using (ModelOfShop db = new ModelOfShop())
     {
         db.Brands.Add(brand);
         db.SaveChanges();
     }
 }
Esempio n. 6
0
 public static void RemoveUser(User user)
 {
     using (ModelOfShop db = new ModelOfShop())
     {
         db.Users.Remove(user);
         db.SaveChanges();
     }
 }
Esempio n. 7
0
 public static void AddUser(params User[] user)
 {
     using (ModelOfShop db = new ModelOfShop())
     {
         db.Users.AddRange(user);
         db.SaveChanges();
     }
 }
Esempio n. 8
0
 public static void AddUser(User user)
 {
     using (ModelOfShop db = new ModelOfShop())
     {
         db.Users.Add(user);
         db.SaveChanges();
     }
 }