Пример #1
0
        public static void Register <T>(IsolationStrategy strategy) where T : Entity
        {
            strategies.Add(typeof(T), strategy);

            if (strategy == IsolationStrategy.Isolated || strategy == IsolationStrategy.Optional)
            {
                MixinDeclarations.Register(typeof(T), typeof(IsolationMixin));
            }

            if (strategy == IsolationStrategy.Optional)
            {
                Schema.Current.Settings.FieldAttributes((T e) => e.Mixin <IsolationMixin>().Isolation).Remove <NotNullableAttribute>(); //Remove non-null
            }
        }
Пример #2
0
 protected override void CopyFrom(MixinEntity mixin, object[] args)
 {
     this.IsolationStrategy = ((DynamicIsolationMixin)mixin).IsolationStrategy;
 }