private bool HasConfiguredConstraint() { if (this._configuration != null && this._configuration.Constraint != null && this._configuration.Constraint.IsFullySpecified) { return(true); } if (this._configuration != null && this._configuration.InverseNavigationProperty != (PropertyInfo)null) { Type targetType = this._configuration.NavigationProperty.PropertyType.GetTargetType(); if (this._modelConfiguration.Entities.Contains <Type>(targetType)) { EntityTypeConfiguration typeConfiguration = this._modelConfiguration.Entity(targetType); if (typeConfiguration.IsNavigationPropertyConfigured(this._configuration.InverseNavigationProperty)) { return(typeConfiguration.Navigation(this._configuration.InverseNavigationProperty).Constraint != null); } } } return(false); }