private static PropertyCollection BuildParentProperties(CslaObjectInfo info) { var propertyCollection = new PropertyCollection(); CslaObjectInfo parent = info.FindMyParent(info); if (parent != null) { foreach (Property pvp in parent.ValueProperties) { ValueProperty prop = parent.GetAllValueProperties().Find(pvp.Name); if (prop != null && prop.PrimaryKey != ValueProperty.UserDefinedKeyBehaviour.Default) { propertyCollection.Add(prop); } } } return(propertyCollection); }