public void NotMappedAttribute_does_not_override_configuration_from_explicit_source()
        {
            var entityTypeBuilder = CreateInternalEntityTypeBuilder <A>();

            entityTypeBuilder.Property("IgnoredProperty", typeof(string), ConfigurationSource.Explicit);

            entityTypeBuilder = new NotMappedMemberAttributeConvention().Apply(entityTypeBuilder);

            Assert.True(entityTypeBuilder.Metadata.GetProperties().Any(p => p.Name == "IgnoredProperty"));
        }
        public void NotMappedAttribute_on_field_overrides_configuration_from_convention_source()
        {
            var entityTypeBuilder = CreateInternalEntityTypeBuilder <F>();

            entityTypeBuilder.Property("IgnoredProperty", typeof(string), ConfigurationSource.Convention);

            entityTypeBuilder = new NotMappedMemberAttributeConvention().Apply(entityTypeBuilder);

            Assert.False(entityTypeBuilder.Metadata.GetProperties().Any(p => p.Name == "IgnoredProperty"));
        }
        public void NotMappedAttribute_overrides_configuration_from_convention_source()
        {
            var entityTypeBuilder = CreateInternalEntityTypeBuilder <A>();

            entityTypeBuilder.Property("IgnoredProperty", typeof(string), ConfigurationSource.Convention);

            entityTypeBuilder = new NotMappedMemberAttributeConvention(new TestLogger <DbLoggerCategory.Model, TestLoggingDefinitions>()).Apply(entityTypeBuilder);

            Assert.False(entityTypeBuilder.Metadata.GetProperties().Any(p => p.Name == "IgnoredProperty"));
        }