public static void Install(IObjectContainer installOn) {
			var events = EventRegistryFactory.ForObjectContainer(installOn);
			var support = new AutoIncrementSupport();

			events.Creating += (sender, args)
				=> support.IncrementIdsFor(args.Object, installOn);
			events.Committing += (sender, args)
				=> support.StoreState(installOn);
		}
Example #2
0
        public static void Install(IObjectContainer installOn)
        {
            var events  = EventRegistryFactory.ForObjectContainer(installOn);
            var support = new AutoIncrementSupport();

            events.Creating += (sender, args)
                               => support.IncrementIdsFor(args.Object, installOn);
            events.Committing += (sender, args)
                                 => support.StoreState(installOn);
        }