In LLBLGenPro V1 we use the following custom code to establish if an entity has a particular field:
public static bool SafeHasField(EntityBase entity, string fieldName)
{
System.ComponentModel.PropertyDescriptorCollection pdc;
bool hasField = false;
if(entity != null)
{
pdc = entity.GetProperties(null);
// Find returns null if property is not found.
if (pdc.Find(fieldName, true) != null)
{
hasField = true;
}
}
return hasField;
}
The "GetProperties" Method of EntityBase no longer seems to exist. Can anyone suggest another way to do this (other than simply trying to access field, and catching any errors)?
Thanks for any help