public static void RemoveCategory(Category category) { using (ModelOfShop db = new ModelOfShop()) { db.Categories.Remove(category); db.SaveChanges(); } }
public static void RemoveBrand(Brand brand) { using (ModelOfShop db = new ModelOfShop()) { db.Brands.Remove(brand); db.SaveChanges(); } }
public static void AddCategory(params Category[] category) { using (ModelOfShop db = new ModelOfShop()) { db.Categories.AddRange(category); db.SaveChanges(); } }
public static void AddBrand(params Brand[] brand) { using (ModelOfShop db = new ModelOfShop()) { db.Brands.AddRange(brand); db.SaveChanges(); } }
public static void AddBrand(Brand brand) { using (ModelOfShop db = new ModelOfShop()) { db.Brands.Add(brand); db.SaveChanges(); } }
public static void RemoveUser(User user) { using (ModelOfShop db = new ModelOfShop()) { db.Users.Remove(user); db.SaveChanges(); } }
public static void AddUser(params User[] user) { using (ModelOfShop db = new ModelOfShop()) { db.Users.AddRange(user); db.SaveChanges(); } }
public static void AddUser(User user) { using (ModelOfShop db = new ModelOfShop()) { db.Users.Add(user); db.SaveChanges(); } }