private void PersistentClassesMustHaveIdentity(ValidationContext context) { if (!IsDependentType && !AllIdentityAttributes.Any()) { context.LogError($"{Name}: Class has no identity property in inheritance chain", "MCENoIdentity", this); } }
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); } }