Example #1
0
 private void PersistentClassesMustHaveIdentity(ValidationContext context)
 {
     if (!IsDependentType && !AllIdentityAttributes.Any())
     {
         context.LogError($"{Name}: Class has no identity property in inheritance chain", "MCENoIdentity", this);
     }
 }
Example #2
0
        private void PersistentClassesMustHaveIdentity(ValidationContext context)
        {
            if (ModelRoot == null)
            {
                return;
            }

            if (!IsDependentType && !IsDatabaseView && !IsQueryType && !AllIdentityAttributes.Any())
            {
                context.LogError($"{Name}: Class has no identity property in inheritance chain", "MCENoIdentity", this);
            }
        }