// fetch all from table into new List of class instances, filtered by any column
        // links:
        //  docLink: http://sql2x.org/documentationLink/db27658d-4d23-46d7-9970-7bbaef8634b0
        public List <CrudeAirlineLanguageModel> FetchWithFilter(System.Guid airlineLanguageId, System.Guid airlineId, string languageRcd, string airlineLanguageName, System.Guid userId, System.DateTime dateTime)
        {
            var list = new List <CrudeAirlineLanguageModel>();
            List <CrudeAirlineLanguageData> dataList = CrudeAirlineLanguageData.FetchWithFilter(airlineLanguageId, airlineId, languageRcd, airlineLanguageName, userId, dateTime);

            foreach (CrudeAirlineLanguageData data in dataList)
            {
                var crudeAirlineLanguageBusinessModel = new CrudeAirlineLanguageModel();
                DataToModel(data, crudeAirlineLanguageBusinessModel);
                list.Add(crudeAirlineLanguageBusinessModel);
            }

            return(list);
        }
예제 #2
0
        // fetch all rows from table into new List of Contracts, filtered by any column
        // links:
        //  docLink: http://sql2x.org/documentationLink/ce01ef4a-5cd0-4e51-b211-9c0a15b791a0
        public List <CrudeAirlineLanguageContract> FetchWithFilter(System.Guid airlineLanguageId, System.Guid airlineId, string languageRcd, string airlineLanguageName, System.Guid userId, System.DateTime dateTime)
        {
            var list = new List <CrudeAirlineLanguageContract>();
            List <CrudeAirlineLanguageData> dataList = CrudeAirlineLanguageData.FetchWithFilter(
                airlineLanguageId: airlineLanguageId,
                airlineId: airlineId,
                languageRcd: languageRcd,
                airlineLanguageName: airlineLanguageName,
                userId: userId,
                dateTime: dateTime
                );

            foreach (CrudeAirlineLanguageData data in dataList)
            {
                var crudeAirlineLanguageContract = new CrudeAirlineLanguageContract();
                DataToContract(data, crudeAirlineLanguageContract);
                list.Add(crudeAirlineLanguageContract);
            }

            return(list);
        }