Ejemplo n.º 1
0
        /// <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>
        /// An <see cref="T:System.Data.Entity.Core.Metadata.Edm.EntitySet" /> object that represents the entity set that has the specified name.
        /// </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>
        public EntitySet GetEntitySetByName(string name, bool ignoreCase)
        {
            var entitySet = (BaseEntitySets.GetValue(name, ignoreCase) as EntitySet);

            if (null != entitySet)
            {
                return(entitySet);
            }
            throw new ArgumentException(Strings.InvalidEntitySetName(name));
        }
        /// <summary>
        /// Get the entity set with the given name
        /// </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>
        /// <returns></returns>
        public EntitySet GetEntitySetByName(string name, bool ignoreCase)
        {
            EntitySet entitySet = (BaseEntitySets.GetValue(name, ignoreCase) as EntitySet);

            if (null != entitySet)
            {
                return(entitySet);
            }
            throw EntityUtil.InvalidEntitySetName(name);
        }