/// <summary> /// Get the entity set with the given name or return null if not found /// </summary> /// <param name="name">name of the entity set to look up for</param> /// <param name="ignoreCase">true if you want to do a case-insensitive lookup</param> /// <param name="entitySet">out parameter that will contain the result</param> /// <returns></returns> /// <exception cref="System.ArgumentNullException">if name argument is null</exception> public bool TryGetEntitySetByName(string name, bool ignoreCase, out EntitySet entitySet) { EntityUtil.CheckArgumentNull(name, "name"); EntitySetBase baseEntitySet = null; entitySet = null; if (this.BaseEntitySets.TryGetValue(name, ignoreCase, out baseEntitySet)) { if (Helper.IsEntitySet(baseEntitySet)) { entitySet = (EntitySet)baseEntitySet; return(true); } } return(false); }