/// <summary> /// Returns a <see cref="T:System.Data.Entity.Core.Metadata.Edm.RelationshipSet" /> object by using the specified name for the relationship set. /// </summary> /// <returns>true if there is a relationship set that matches the search criteria; otherwise, false. </returns> /// <param name="name">The name of the relationship set that is searched for.</param> /// <param name="ignoreCase">true to perform the case-insensitive search; otherwise, false.</param> /// <param name="relationshipSet"> /// When this method returns, contains a <see cref="T:System.Data.Entity.Core.Metadata.Edm.RelationshipSet" /> object. /// </param> public bool TryGetRelationshipSetByName(string name, bool ignoreCase, out RelationshipSet relationshipSet) { Check.NotNull(name, "name"); EntitySetBase baseEntitySet = null; relationshipSet = null; if (BaseEntitySets.TryGetValue(name, ignoreCase, out baseEntitySet)) { if (Helper.IsRelationshipSet(baseEntitySet)) { relationshipSet = (RelationshipSet)baseEntitySet; return(true); } } return(false); }
/// <summary> /// Returns an <see cref="T:System.Data.Entity.Core.Metadata.Edm.EntitySet" /> object by using the specified name for the entity set. /// </summary> /// <returns>true if there is an entity set that matches the search criteria; otherwise, false.</returns> /// <param name="name">The name of the entity set that is searched for.</param> /// <param name="ignoreCase">true to perform the case-insensitive search; otherwise, false.</param> /// <param name="entitySet"> /// When this method returns, contains an <see cref="T:System.Data.Entity.Core.Metadata.Edm.EntitySet" /> object. If there is no entity set, this output parameter contains null. /// </param> public bool TryGetEntitySetByName(string name, bool ignoreCase, out EntitySet entitySet) { Check.NotNull(name, "name"); EntitySetBase baseEntitySet = null; entitySet = null; if (BaseEntitySets.TryGetValue(name, ignoreCase, out baseEntitySet)) { if (Helper.IsEntitySet(baseEntitySet)) { entitySet = (EntitySet)baseEntitySet; return(true); } } return(false); }