コード例 #1
0
        public void OnEntityInsert(IInsertingEntry <ProductInstance, InventoryContext> entry)
        {
            Log log = new Log(this._userService.CurrentUser.UserName, entry.Entity.GetType().ToString(), entry.Entity.Name, InventoryOperations.ADD.GetDescription(), DateTime.UtcNow);

            log.SessionId = this._userService.CurrentSession.Id;
            entry.Context.Logs.Add(log);
        }
コード例 #2
0
        public void OnEntityInsert(IInsertingEntry <Lot, InventoryContext> entry)
        {
            Log log = new Log(this._userService.CurrentUser.UserName, entry.Entity.GetType().ToString(),
                              "(" + entry.Entity.LotNumber + "," + entry.Entity.SupplierPoNumber + ")",
                              InventoryOperations.ADD.GetDescription(), DateTime.UtcNow);

            log.SessionId = this._userService.CurrentSession.Id;
            entry.Context.Logs.Add(log);
        }
コード例 #3
0
        public static void OnInserting(IInsertingEntry entry)
        {
            var entity = (BaseModel)entry.Entity;
            var now    = DateTime.Now;

            SetCreated(entity, now);
            SetModified(entity, now);
            SetIsDeleted(entity);
        }
コード例 #4
0
		private static void Add15(IInsertingEntry<IApple,     Context> e)      => e.Entity.Numbers.Add(15);
コード例 #5
0
		private static void Add12(IInsertingEntry<IThing,     DbContextWithTriggers> e)      => e.Entity.Numbers.Add(12);
コード例 #6
0
		private static void Add11(IInsertingEntry<IRoyalGala, DbContextWithTriggers> e)      => e.Entity.Numbers.Add(11);
コード例 #7
0
		private static void Add9 (IInsertingEntry<IApple,     DbContextWithTriggers> e)      => e.Entity.Numbers.Add(9);
コード例 #8
0
 public void OnInsert(IInsertingEntry <Attachment, InventoryContext> entry)
 {
     entry.Entity.FileReference = this._fileService.SaveFile(entry.Entity.Name, entry.Entity.SourceReference);
 }
コード例 #9
0
 public void OnEntityInsert(IInsertingEntry <PartInstance, InventoryContext> entry) => throw new NotImplementedException();
コード例 #10
0
 private void OnTriggersOnInserting(IInsertingEntry <Thing, DbContext> e) => e.Entity.Value = "changed";
コード例 #11
0
		private void OnTriggersOnInserting(IInsertingEntry<Thing, DbContext> e) => e.Entity.Value = "changed";
コード例 #12
0
 public void OnEntityInsert(IInsertingEntry <Manufacturer, InventoryContext> entry) => throw new NotImplementedException();
コード例 #13
0
 public void OnEntityInsert(IInsertingEntry <Distributor, InventoryContext> entry) => throw new NotImplementedException();
コード例 #14
0
 public void OnEntityInsert(IInsertingEntry <Organization, InventoryContext> entry) => throw new NotImplementedException();
コード例 #15
0
		private static void Add17(IInsertingEntry<IRoyalGala, Context> e)      => e.Entity.Numbers.Add(17);
コード例 #16
0
		private static void Add18(IInsertingEntry<IThing,     Context> e)      => e.Entity.Numbers.Add(18);
コード例 #17
0
		private static void Add3(IInsertingEntry<IApple,     DbContext> e)      => e.Entity.Numbers.Add(3);
コード例 #18
0
 public void OnEntityInsert(IInsertingEntry <Attachment, InventoryContext> entry) => throw new NotImplementedException();
コード例 #19
0
		private static void Add5(IInsertingEntry<IRoyalGala, DbContext> e)      => e.Entity.Numbers.Add(5);
コード例 #20
0
		private static void Add6(IInsertingEntry<IThing,     DbContext> e)      => e.Entity.Numbers.Add(6);
コード例 #21
0
 public void OnInsert(IInsertingEntry <Part, InventoryContext> entry)
 {
 }