/// <summary>
        /// This method fetches a  'List<NotificationHistory>' object.
        /// This method uses the 'NotificationHistorys_FetchAll' procedure.
        /// </summary>
        /// <returns>A 'List<NotificationHistory>'</returns>
        /// </summary>
        public List <NotificationHistory> FetchAllNotificationHistorys(FetchAllNotificationHistorysStoredProcedure fetchAllNotificationHistorysProc, DataConnector databaseConnector)
        {
            // Initial Value
            List <NotificationHistory> notificationHistoryCollection = null;

            // Verify database connection is connected
            if ((databaseConnector != null) && (databaseConnector.Connected))
            {
                // First Get Dataset
                DataSet allNotificationHistorysDataSet = this.DataHelper.LoadDataSet(fetchAllNotificationHistorysProc, databaseConnector);

                // Verify DataSet Exists
                if (allNotificationHistorysDataSet != null)
                {
                    // Get DataTable From DataSet
                    DataTable table = this.DataHelper.ReturnFirstTable(allNotificationHistorysDataSet);

                    // if table exists
                    if (table != null)
                    {
                        // Load Collection
                        notificationHistoryCollection = NotificationHistoryReader.LoadCollection(table);
                    }
                }
            }

            // return value
            return(notificationHistoryCollection);
        }
        /// <summary>
        /// This method creates an instance of a
        /// 'FetchAllNotificationHistorysStoredProcedure' object and
        /// creates the sql parameter[] array needed
        /// to execute the procedure 'NotificationHistory_FetchAll'.
        /// </summary>
        /// <returns>An instance of a(n) 'FetchAllNotificationHistorysStoredProcedure' object.</returns>
        public static FetchAllNotificationHistorysStoredProcedure CreateFetchAllNotificationHistorysStoredProcedure(NotificationHistory notificationHistory)
        {
            // Initial value
            FetchAllNotificationHistorysStoredProcedure fetchAllNotificationHistorysStoredProcedure = new FetchAllNotificationHistorysStoredProcedure();

            // return value
            return(fetchAllNotificationHistorysStoredProcedure);
        }
        /// <summary>
        /// This method fetches all 'NotificationHistory' objects.
        /// </summary>
        /// <param name='List<PolymorphicObject>'>The 'NotificationHistory' to delete.
        /// <returns>A PolymorphicObject object with all  'NotificationHistorys' objects.
        internal PolymorphicObject FetchAll(List <PolymorphicObject> parameters, DataConnector dataConnector)
        {
            // Initial Value
            PolymorphicObject returnObject = new PolymorphicObject();

            // locals
            List <NotificationHistory> notificationHistoryListCollection = null;

            // Create FetchAll StoredProcedure
            FetchAllNotificationHistorysStoredProcedure fetchAllProc = null;

            // If the data connection is connected
            if ((dataConnector != null) && (dataConnector.Connected == true))
            {
                // Get NotificationHistoryParameter
                // Declare Parameter
                NotificationHistory paramNotificationHistory = null;

                // verify the first parameters is a(n) 'NotificationHistory'.
                if (parameters[0].ObjectValue as NotificationHistory != null)
                {
                    // Get NotificationHistoryParameter
                    paramNotificationHistory = (NotificationHistory)parameters[0].ObjectValue;
                }

                // Now create FetchAllNotificationHistorysProc from NotificationHistoryWriter
                fetchAllProc = NotificationHistoryWriter.CreateFetchAllNotificationHistorysStoredProcedure(paramNotificationHistory);
            }

            // Verify fetchAllProc exists
            if (fetchAllProc != null)
            {
                // Execute FetchAll Stored Procedure
                notificationHistoryListCollection = this.DataManager.NotificationHistoryManager.FetchAllNotificationHistorys(fetchAllProc, dataConnector);

                // if dataObjectCollection exists
                if (notificationHistoryListCollection != null)
                {
                    // set returnObject.ObjectValue
                    returnObject.ObjectValue = notificationHistoryListCollection;
                }
            }
            else
            {
                // Raise Error Data Connection Not Available
                throw new Exception("The database connection is not available.");
            }

            // return value
            return(returnObject);
        }