protected static string propertyKeyName(Type Type)
{
PropertyInfo[] properies = Type.GetProperties();
foreach (PropertyInfo property in properies)
{
if (Attribute.IsDefined(property, typeof(PropertyKeyRecord)))
{
var attributeValue =
Attribute.GetCustomAttribute(property, typeof(PropertyKeyRecord)) as PropertyKeyRecord;
if (attributeValue.Name != null) return attributeValue.Name;
else return property.Name;
}
}
return null;
}