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); }
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); }
public static void OnInserting(IInsertingEntry entry) { var entity = (BaseModel)entry.Entity; var now = DateTime.Now; SetCreated(entity, now); SetModified(entity, now); SetIsDeleted(entity); }
private static void Add15(IInsertingEntry<IApple, Context> e) => e.Entity.Numbers.Add(15);
private static void Add12(IInsertingEntry<IThing, DbContextWithTriggers> e) => e.Entity.Numbers.Add(12);
private static void Add11(IInsertingEntry<IRoyalGala, DbContextWithTriggers> e) => e.Entity.Numbers.Add(11);
private static void Add9 (IInsertingEntry<IApple, DbContextWithTriggers> e) => e.Entity.Numbers.Add(9);
public void OnInsert(IInsertingEntry <Attachment, InventoryContext> entry) { entry.Entity.FileReference = this._fileService.SaveFile(entry.Entity.Name, entry.Entity.SourceReference); }
public void OnEntityInsert(IInsertingEntry <PartInstance, InventoryContext> entry) => throw new NotImplementedException();
private void OnTriggersOnInserting(IInsertingEntry <Thing, DbContext> e) => e.Entity.Value = "changed";
private void OnTriggersOnInserting(IInsertingEntry<Thing, DbContext> e) => e.Entity.Value = "changed";
public void OnEntityInsert(IInsertingEntry <Manufacturer, InventoryContext> entry) => throw new NotImplementedException();
public void OnEntityInsert(IInsertingEntry <Distributor, InventoryContext> entry) => throw new NotImplementedException();
public void OnEntityInsert(IInsertingEntry <Organization, InventoryContext> entry) => throw new NotImplementedException();
private static void Add17(IInsertingEntry<IRoyalGala, Context> e) => e.Entity.Numbers.Add(17);
private static void Add18(IInsertingEntry<IThing, Context> e) => e.Entity.Numbers.Add(18);
private static void Add3(IInsertingEntry<IApple, DbContext> e) => e.Entity.Numbers.Add(3);
public void OnEntityInsert(IInsertingEntry <Attachment, InventoryContext> entry) => throw new NotImplementedException();
private static void Add5(IInsertingEntry<IRoyalGala, DbContext> e) => e.Entity.Numbers.Add(5);
private static void Add6(IInsertingEntry<IThing, DbContext> e) => e.Entity.Numbers.Add(6);
public void OnInsert(IInsertingEntry <Part, InventoryContext> entry) { }