public void Can_get_and_set_configuration_facet()
        {
            var associationType = new AssociationType();

            associationType.SourceEnd = new AssociationEndMember("S", new EntityType());
            associationType.TargetEnd = new AssociationEndMember("T", new EntityType());
            associationType.SetConfiguration(42);

            Assert.Equal(42, associationType.GetConfiguration());
        }
        public void Can_get_and_set_configuration_facet()
        {
            var associationType = new AssociationType("A", XmlConstants.ModelNamespace_3, false, DataSpace.CSpace);

            associationType.SourceEnd = new AssociationEndMember("S", new EntityType("E", "N", DataSpace.CSpace));
            associationType.TargetEnd = new AssociationEndMember("T", new EntityType("E", "N", DataSpace.CSpace));
            associationType.SetConfiguration(42);

            Assert.Equal(42, associationType.GetConfiguration());
        }
Example #3
0
        internal void Configure(
            System.Data.Entity.Core.Metadata.Edm.NavigationProperty navigationProperty,
            EdmModel model,
            EntityTypeConfiguration entityTypeConfiguration)
        {
            navigationProperty.SetConfiguration((object)this);
            AssociationType association = navigationProperty.Association;
            NavigationPropertyConfiguration configuration = association.GetConfiguration() as NavigationPropertyConfiguration;

            if (configuration == null)
            {
                association.SetConfiguration((object)this);
            }
            else
            {
                this.EnsureConsistency(configuration);
            }
            this.ConfigureInverse(association, model);
            this.ConfigureEndKinds(association, configuration);
            this.ConfigureDependentBehavior(association, model, entityTypeConfiguration);
        }