Amended EntityRuleProvider to support entity rules