public virtual void AddInjectRule([NotNull] EntityRule rule)
 {
     Check.NotNull(rule, nameof(rule));
     if (IsInjectRule(rule.Id))
     {
         return;
     }
     InjectRules.Add(new EntityRuleInject(rule.Id, Id, TenantId));
 }
        public virtual void AddSubRule([NotNull] EntityRule rule)
        {
            Check.NotNull(rule, nameof(rule));

            if (IsInRule(rule.Id))
            {
                return;
            }
            SubRules.Add(new EntitySubRule(Id, rule.Id, TenantId));
        }