// 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 <CrudeFlightScheduleSegmentRuleModel> FetchWithFilter(System.Guid flightScheduleSegmentRuleId, System.Guid flightScheduleSegmentId, string flightScheduleSegmentRuleRcd, System.Guid userId, System.DateTime dateTime)
        {
            var list = new List <CrudeFlightScheduleSegmentRuleModel>();
            List <CrudeFlightScheduleSegmentRuleData> dataList = CrudeFlightScheduleSegmentRuleData.FetchWithFilter(flightScheduleSegmentRuleId, flightScheduleSegmentId, flightScheduleSegmentRuleRcd, userId, dateTime);

            foreach (CrudeFlightScheduleSegmentRuleData data in dataList)
            {
                var crudeFlightScheduleSegmentRuleBusinessModel = new CrudeFlightScheduleSegmentRuleModel();
                DataToModel(data, crudeFlightScheduleSegmentRuleBusinessModel);
                list.Add(crudeFlightScheduleSegmentRuleBusinessModel);
            }

            return(list);
        }
Exemplo n.º 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 <CrudeFlightScheduleSegmentRuleContract> FetchWithFilter(System.Guid flightScheduleSegmentRuleId, System.Guid flightScheduleSegmentId, string flightScheduleSegmentRuleRcd, System.Guid userId, System.DateTime dateTime)
        {
            var list = new List <CrudeFlightScheduleSegmentRuleContract>();
            List <CrudeFlightScheduleSegmentRuleData> dataList = CrudeFlightScheduleSegmentRuleData.FetchWithFilter(
                flightScheduleSegmentRuleId: flightScheduleSegmentRuleId,
                flightScheduleSegmentId: flightScheduleSegmentId,
                flightScheduleSegmentRuleRcd: flightScheduleSegmentRuleRcd,
                userId: userId,
                dateTime: dateTime
                );

            foreach (CrudeFlightScheduleSegmentRuleData data in dataList)
            {
                var crudeFlightScheduleSegmentRuleContract = new CrudeFlightScheduleSegmentRuleContract();
                DataToContract(data, crudeFlightScheduleSegmentRuleContract);
                list.Add(crudeFlightScheduleSegmentRuleContract);
            }

            return(list);
        }