public void 假設ShopContext刪除時會以更新IsValid為false取代()
        {
            List<IPreActionHook> hooks = new List<IPreActionHook>();
            hooks.Add(new ReplaceDeleteByIsValidPreDeleteHook());

            this.shopContext = new ShopContext(hooks);
        }
        public void 假設ShopContext自動寫入稽核紀錄()
        {
            List<IPreActionHook> hooks = new List<IPreActionHook>();
            hooks.Add(new AuditLogPreInsertHook(this.httpContext));
            hooks.Add(new AuditLogPreUpdateHook(this.httpContext));

            this.shopContext = new ShopContext(hooks);
        }
        public void 假設ShopContext更新時會自動更新系統資訊()
        {
            List<IPreActionHook> hooks = new List<IPreActionHook>();
            hooks.Add(new UpdateSystemInfoPreUpdateHook(this.httpContext));
            hooks.Add(new UpdateSystemInfoPreInsertHook(this.httpContext));

            this.shopContext = new ShopContext(hooks);
        }
Esempio n. 4
0
 public ProductRepository(ShopContext context)
 {
     this.ShopContext = context;
 }
Esempio n. 5
0
 public UserRepository(ShopContext context)
 {
     this.ShopContext = context;
 }
 public void ScenarioSetup()
 {
     this.shopContext = new ShopContext(new List<IPreActionHook>());
     this.shopContext.Database.Delete();
 }
Esempio n. 7
0
 public CategoryRepository(ShopContext context)
 {
     this.ShopContext = context;
 }