OneToOneMapping IOneToOneMappingProvider.GetOneToOneMapping() { var mapping = new OneToOneMapping(attributes.CloneInner()); mapping.ContainingEntityType = entity; if (!mapping.IsSpecified("Class")) { mapping.SetDefaultValue(x => x.Class, new TypeReference(typeof(TOther))); } if (!mapping.IsSpecified("Name")) { mapping.SetDefaultValue(x => x.Name, property.Name); } return(mapping); }
public new void Class <T>() { if (!mapping.IsSpecified("Class")) { mapping.Class = new TypeReference(typeof(T)); } }
public bool IsSet(Member property) { return(mapping.IsSpecified(propertyMappings.Get(property))); }