private bool DetermineRequiresIsTypeOf( TableMapping tableMapping, EntitySet entitySet, EntityType entityType) { // IsTypeOf if this is the root for this table and any derived type shares a property mapping return entityType.IsRootOfSet(tableMapping.EntityTypes.GetEntityTypes(entitySet)) && ((tableMapping.EntityTypes.GetEntityTypes(entitySet).Count() > 1 && tableMapping.EntityTypes.GetEntityTypes(entitySet).Any(et => et != entityType && !et.Abstract)) || _tableMappings.Values.Any( tm => tm != tableMapping && tm.Table.ForeignKeyBuilders.Any( fk => fk.GetIsTypeConstraint() && fk.PrincipalTable == tableMapping.Table))); }