public Property SearchProperty(string property) { if (BagType == BagType.Dynamic) { if (ContainsProperty(property)) { return(RuleAwareEntityPropertyInfo.GetDynamicProperty(_entityType, property)); } } if (BagType == BagType.Calculated) { if (ContainsProperty(property)) { return(RuleAwareEntityPropertyInfo.GetCalculatedProperty(_entityType, property)); } } throw new PropertyNotFoundException(property, _entityType); }
public bool ContainsProperty(string property) { if (BagType == BagType.Dynamic) { var prop = RuleAwareEntityPropertyInfo.GetDynamicProperty(_entityType, property); if (prop.IsNotFound) { return(false); } return(true); } if (BagType == BagType.Calculated) { var prop = RuleAwareEntityPropertyInfo.GetCalculatedProperty(_entityType, property); if (prop.IsNotFound) { return(false); } return(true); } return(false); }