public CategoryАccess() { db = AutoPartsStoreContext.GetStoreContext(); if (db.Categories.Where(c => c.CategoryLevel == 0).FirstOrDefault() == null) { Category topCategory = new Category(null, "Top category"); topCategory.CategoryLevel = 0; db.Categories.Add(topCategory); db.SaveChanges(); } UpdateCategoryInfo(); }
public VehiclePartRepository(AutoPartsStoreContext db) { this.db = db; }
public ReviewRepository(AutoPartsStoreContext db) { this.db = db; }
public VehicleAccess() { db = AutoPartsStoreContext.GetStoreContext(); }
public ProductRepository(AutoPartsStoreContext db) { this.db = db; }
public AdminRepository(AutoPartsStoreContext db) { this.db = db; }
public CategoryRepository(AutoPartsStoreContext db) { this.db = db; }
public ManufacturerRepository(AutoPartsStoreContext db) { this.db = db; }
public void OnWindowClosing(object sender, CancelEventArgs e) { AutoPartsStoreContext.GetStoreContext().Dispose(); }
public OrderRepository(AutoPartsStoreContext db) { this.db = db; }
public VehicleModificationRepository(AutoPartsStoreContext db) { this.db = db; }