public void Map(ClassMapping classMap) { foreach(var property in classMap.Type.GetProperties()) { if (!classMap.HasMappedProperty(property)) { if (property.PropertyType.Namespace == "System") { var propMapping = new PropertyMapping {Name = property.Name}; propMapping.BindToMember(property); classMap.AddProperty(propMapping); } } } }
public void Should_apply_to_property_mapping() { var propertyInfo = ReflectionHelper.GetMember((Album a) => a.Title); var propertyMapping = new PropertyMapping(); propertyMapping.BindToMember(propertyInfo); _namingConvention.ProcessProperty(propertyMapping); propertyMapping.Name.ShouldEqual(propertyMapping.MappedMember.Name); }