/// <summary> /// This method fetches a 'List<Adjective>' object. /// This method uses the 'Adjectives_FetchAll' procedure. /// </summary> /// <returns>A 'List<Adjective>'</returns> /// </summary> public List <Adjective> FetchAllAdjectives(FetchAllAdjectivesStoredProcedure fetchAllAdjectivesProc, DataConnector databaseConnector) { // Initial Value List <Adjective> adjectiveCollection = null; // Verify database connection is connected if ((databaseConnector != null) && (databaseConnector.Connected)) { // First Get Dataset DataSet allAdjectivesDataSet = this.DataHelper.LoadDataSet(fetchAllAdjectivesProc, databaseConnector); // Verify DataSet Exists if (allAdjectivesDataSet != null) { // Get DataTable From DataSet DataTable table = this.DataHelper.ReturnFirstTable(allAdjectivesDataSet); // if table exists if (table != null) { // Load Collection adjectiveCollection = AdjectiveReader.LoadCollection(table); } } } // return value return(adjectiveCollection); }
/// <summary> /// This method finds a 'Adjective' object. /// This method uses the 'Adjective_Find' procedure. /// </summary> /// <returns>A 'Adjective' object.</returns> /// </summary> public Adjective FindAdjective(FindAdjectiveStoredProcedure findAdjectiveProc, DataConnector databaseConnector) { // Initial Value Adjective adjective = null; // Verify database connection is connected if ((databaseConnector != null) && (databaseConnector.Connected)) { // First Get Dataset DataSet adjectiveDataSet = this.DataHelper.LoadDataSet(findAdjectiveProc, databaseConnector); // Verify DataSet Exists if (adjectiveDataSet != null) { // Get DataTable From DataSet DataRow row = this.DataHelper.ReturnFirstRow(adjectiveDataSet); // if row exists if (row != null) { // Load Adjective adjective = AdjectiveReader.Load(row); } } } // return value return(adjective); }