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);
        }
示例#4
0
 public ProductRepository(ShopContext context)
 {
     this.ShopContext = context;
 }
示例#5
0
 public UserRepository(ShopContext context)
 {
     this.ShopContext = context;
 }
 public void ScenarioSetup()
 {
     this.shopContext = new ShopContext(new List<IPreActionHook>());
     this.shopContext.Database.Delete();
 }
示例#7
0
 public CategoryRepository(ShopContext context)
 {
     this.ShopContext = context;
 }