コード例 #1
0
        private NavigationPropertyConfiguration(NavigationPropertyConfiguration source)
        {
            DebugCheck.NotNull(source);

            _navigationProperty        = source._navigationProperty;
            _endKind                   = source._endKind;
            _inverseNavigationProperty = source._inverseNavigationProperty;
            _inverseEndKind            = source._inverseEndKind;

            _constraint = source._constraint == null
                              ? null
                              : source._constraint.Clone();

            _associationMappingConfiguration
                = source._associationMappingConfiguration == null
                      ? null
                      : source._associationMappingConfiguration.Clone();

            DeleteAction = source.DeleteAction;
            IsNavigationPropertyDeclaringTypePrincipal = source.IsNavigationPropertyDeclaringTypePrincipal;

            _modificationStoredProceduresConfiguration
                = source._modificationStoredProceduresConfiguration == null
                      ? null
                      : source._modificationStoredProceduresConfiguration.Clone();
        }
コード例 #2
0
        internal void Configure(
            AssociationSetMapping associationSetMapping,
            DbDatabaseMapping databaseMapping,
            DbProviderManifest providerManifest)
        {
            DebugCheck.NotNull(associationSetMapping);
            DebugCheck.NotNull(databaseMapping);
            DebugCheck.NotNull(providerManifest);

            // We may apply configuration twice from two different NavigationPropertyConfiguration objects,
            // but that should be okay since they were validated as consistent above.
            // We still apply twice because each object may have different pieces of the full configuration.
            if (AssociationMappingConfiguration != null)
            {
                // This may replace a configuration previously set, but that's okay since we validated
                // consistency when processing the configuration above.
                associationSetMapping.SetConfiguration(this);

                AssociationMappingConfiguration
                .Configure(associationSetMapping, databaseMapping.Database, _navigationProperty);
            }

            if (_modificationStoredProceduresConfiguration != null)
            {
                if (associationSetMapping.ModificationFunctionMapping == null)
                {
                    new ModificationFunctionMappingGenerator(providerManifest)
                    .Generate(associationSetMapping, databaseMapping);
                }

                _modificationStoredProceduresConfiguration
                .Configure(associationSetMapping.ModificationFunctionMapping, providerManifest);
            }
        }
コード例 #3
0
        private NavigationPropertyConfiguration(NavigationPropertyConfiguration source)
        {
            DebugCheck.NotNull(source);

            _navigationProperty = source._navigationProperty;
            _endKind = source._endKind;
            _inverseNavigationProperty = source._inverseNavigationProperty;
            _inverseEndKind = source._inverseEndKind;

            _constraint = source._constraint == null
                              ? null
                              : source._constraint.Clone();

            _associationMappingConfiguration
                = source._associationMappingConfiguration == null
                      ? null
                      : source._associationMappingConfiguration.Clone();

            DeleteAction = source.DeleteAction;
            IsNavigationPropertyDeclaringTypePrincipal = source.IsNavigationPropertyDeclaringTypePrincipal;

            _modificationFunctionsConfiguration
                = source._modificationFunctionsConfiguration == null
                      ? null
                      : source._modificationFunctionsConfiguration.Clone();
        }
コード例 #4
0
 internal void Reset()
 {
     _endKind = null;
     _inverseNavigationProperty = null;
     _inverseEndKind            = null;
     _constraint = null;
     _associationMappingConfiguration = null;
 }
コード例 #5
0
 internal void Reset()
 {
     this._endKind = new System.Data.Entity.Core.Metadata.Edm.RelationshipMultiplicity?();
     this._inverseNavigationProperty = (PropertyInfo)null;
     this._inverseEndKind            = new System.Data.Entity.Core.Metadata.Edm.RelationshipMultiplicity?();
     this._constraint = (ConstraintConfiguration)null;
     this._associationMappingConfiguration = (AssociationMappingConfiguration)null;
 }
コード例 #6
0
 private NavigationPropertyConfiguration(NavigationPropertyConfiguration source)
 {
     this._navigationProperty                        = source._navigationProperty;
     this._endKind                                   = source._endKind;
     this._inverseNavigationProperty                 = source._inverseNavigationProperty;
     this._inverseEndKind                            = source._inverseEndKind;
     this._constraint                                = source._constraint == null ? (ConstraintConfiguration)null : source._constraint.Clone();
     this._associationMappingConfiguration           = source._associationMappingConfiguration == null ? (AssociationMappingConfiguration)null : source._associationMappingConfiguration.Clone();
     this.DeleteAction                               = source.DeleteAction;
     this.IsNavigationPropertyDeclaringTypePrincipal = source.IsNavigationPropertyDeclaringTypePrincipal;
     this._modificationStoredProceduresConfiguration = source._modificationStoredProceduresConfiguration == null ? (ModificationStoredProceduresConfiguration)null : source._modificationStoredProceduresConfiguration.Clone();
 }
コード例 #7
0
        private NavigationPropertyConfiguration(NavigationPropertyConfiguration source)
        {
            //Contract.Requires(source != null);

            _navigationProperty = source._navigationProperty;
            _endKind = source._endKind;
            _inverseNavigationProperty = source._inverseNavigationProperty;
            _inverseEndKind = source._inverseEndKind;

            _constraint = source._constraint == null ? null : source._constraint.Clone();

            _associationMappingConfiguration = source._associationMappingConfiguration == null
                                                   ? null
                                                   : source._associationMappingConfiguration.Clone();

            DeleteAction = source.DeleteAction;
            IsNavigationPropertyDeclaringTypePrincipal = source.IsNavigationPropertyDeclaringTypePrincipal;
        }
コード例 #8
0
 internal void Reset()
 {
     _endKind = null;
     _inverseNavigationProperty = null;
     _inverseEndKind = null;
     _constraint = null;
     _associationMappingConfiguration = null;
 }