/// <summary>
        /// Executes the specified stored procedure against a database.
        /// </summary>
        /// <param name="context">The ObjectContext to execute against.</param>
        /// <param name="storedProcedure">The stored procedure to execute.</param>
        public static void ExecuteStoredProcedure(this ObjectContext context, object storedProcedure)
        {
            if (storedProcedure == null)
            {
                throw new ArgumentNullException("storedProcedure");
            }

            var info = StoredProcedureParser.BuildStoredProcedureInfo(storedProcedure);

            context.ExecuteStoreCommand(info.Sql, info.SqlParameters);

            SetOutputParameterValues(info.SqlParameters, storedProcedure);
        }
        /// <summary>
        /// Executes the specified stored procedure against a database
        /// and returns an enumerable of T representing the data returned.
        /// </summary>
        /// <typeparam name="T">Type of the data returned from the stored procedure.</typeparam>
        /// <param name="context">The ObjectContext to execute against.</param>
        /// <param name="storedProcedure">The stored procedure to execute.</param>
        /// <returns></returns>
        public static IEnumerable <T> ExecuteStoredProcedure <T>(this ObjectContext context, object storedProcedure)
        {
            if (storedProcedure == null)
            {
                throw new ArgumentNullException("storedProcedure");
            }

            var info = StoredProcedureParser.BuildStoredProcedureInfo(storedProcedure);

            List <T> result = context.ExecuteStoreQuery <T>(info.Sql, info.SqlParameters).ToList();

            SetOutputParameterValues(info.SqlParameters, storedProcedure);

            return(result);
        }