src/Shared/EntityFramework/ModelConfiguration/Configuration/ConventionsConfiguration.cs
/// <summary>
///     Disables a convention for the <see cref="DbModelBuilder" />.
///     The default conventions that are available for removal can be found in the
///     System.Data.Entity.ModelConfiguration.Conventions namespace.
/// </summary>
/// <typeparam name="TConvention"> The type of the convention to be disabled. </typeparam>
Disables a convention for the .
The default conventions that are available for removal can be found in the
System.Data.Entity.ModelConfiguration.Conventions namespace.
Disables a convention for the . The default conventions that are available for removal can be found in the System . Data . Entity . ModelConfiguration . Conventions namespace .
[SuppressMessage("Microsoft.Design", "CA1004:GenericMethodsShouldProvideTypeParameter")]
        public void Remove<TConvention>()
            where TConvention : IConvention
        {
            if (ConventionsTypeFilter.IsConfigurationConvention(typeof(TConvention)))
            {
                _configurationConventions.RemoveAll(c => c.GetType() == typeof(TConvention));
            }
            if (ConventionsTypeFilter.IsConceptualModelConvention(typeof(TConvention)))
            {
                _conceptualModelConventions.RemoveAll(c => c.GetType() == typeof(TConvention));
            }
            if (ConventionsTypeFilter.IsStoreModelConvention(typeof(TConvention)))
            {
                _storeModelConventions.RemoveAll(c => c.GetType() == typeof(TConvention));
            }
            if (ConventionsTypeFilter.IsConceptualToStoreMappingConvention(typeof(TConvention)))
            {
                _conceptualToStoreMappingConventions.RemoveAll(c => c.GetType() == typeof(TConvention));
            }
        }
[ SuppressMessage ( " " , " " ) ] public void Remove < TConvention > ( ) where TConvention : IConvention { if ( ConventionsTypeFilter . IsConfigurationConvention ( typeof ( TConvention ) ) ) { _configurationConventions . RemoveAll ( c => c . GetType ( ) == typeof ( TConvention ) ) ; } if ( ConventionsTypeFilter . IsConceptualModelConvention ( typeof ( TConvention ) ) ) { _conceptualModelConventions . RemoveAll ( c => c . GetType ( ) == typeof ( TConvention ) ) ; } if ( ConventionsTypeFilter . IsStoreModelConvention ( typeof ( TConvention ) ) ) { _storeModelConventions . RemoveAll ( c => c . GetType ( ) == typeof ( TConvention ) ) ; } if ( ConventionsTypeFilter . IsConceptualToStoreMappingConvention ( typeof ( TConvention ) ) ) { _conceptualToStoreMappingConventions . RemoveAll ( c => c . GetType ( ) == typeof ( TConvention ) ) ; } }
Disables a convention for the .
Disables a convention for the .
typeparam
The type of the convention to be disabled.
The type of the convention to be disabled .