コード例 #1
0
 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();
 }
コード例 #2
0
 public VehiclePartRepository(AutoPartsStoreContext db)
 {
     this.db = db;
 }
コード例 #3
0
 public ReviewRepository(AutoPartsStoreContext db)
 {
     this.db = db;
 }
コード例 #4
0
 public VehicleAccess()
 {
     db = AutoPartsStoreContext.GetStoreContext();
 }
コード例 #5
0
 public ProductRepository(AutoPartsStoreContext db)
 {
     this.db = db;
 }
コード例 #6
0
 public AdminRepository(AutoPartsStoreContext db)
 {
     this.db = db;
 }
コード例 #7
0
 public CategoryRepository(AutoPartsStoreContext db)
 {
     this.db = db;
 }
コード例 #8
0
 public ManufacturerRepository(AutoPartsStoreContext db)
 {
     this.db = db;
 }
コード例 #9
0
 public void OnWindowClosing(object sender, CancelEventArgs e)
 {
     AutoPartsStoreContext.GetStoreContext().Dispose();
 }
コード例 #10
0
 public OrderRepository(AutoPartsStoreContext db)
 {
     this.db = db;
 }
コード例 #11
0
 public VehicleModificationRepository(AutoPartsStoreContext db)
 {
     this.db = db;
 }