/// <summary> /// Gets the collection by FKs. /// </summary> /// <param name="criteria">The criteria.</param> /// <returns>a collection</returns> public OrganizationCollection GetCollectionByFKs(OrganizationQueryCriteriaByEntityReference criteria) { MSBuildExtensionPack.EntityContracts.QueryPredicateOrganizationByFKs <Organization> _PrediacteByFKs = new MSBuildExtensionPack.EntityContracts.QueryPredicateOrganizationByFKs <Organization>(criteria); return(new OrganizationCollection(this.Where(_PrediacteByFKs.Predicate))); }
/// <summary> /// Existses the by FKs. /// </summary> /// <param name="criteria">The criteria.</param> /// <returns>true if any, otherwise false</returns> public bool ExistsByFKs(OrganizationQueryCriteriaByEntityReference criteria) { MSBuildExtensionPack.EntityContracts.QueryPredicateOrganizationByFKs <Organization> _PrediacteByFKs = new MSBuildExtensionPack.EntityContracts.QueryPredicateOrganizationByFKs <Organization>(criteria); return(this.Count(_PrediacteByFKs.Predicate) > 0); }