// 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 <CrudeFlightSegmentContract> FetchWithFilter(System.Guid flightSegmentId, System.Guid flightId, System.Guid departureAirportId, System.Guid arrivalAirportId, int logicalSegmentNumber, int physicalSegmentNumber, System.DateTime fromDateTime, System.DateTime untilDateTime, string departureGate, string arrivalGate, System.Guid userId, System.DateTime dateTime) { var list = new List <CrudeFlightSegmentContract>(); List <CrudeFlightSegmentData> dataList = CrudeFlightSegmentData.FetchWithFilter( flightSegmentId: flightSegmentId, flightId: flightId, departureAirportId: departureAirportId, arrivalAirportId: arrivalAirportId, logicalSegmentNumber: logicalSegmentNumber, physicalSegmentNumber: physicalSegmentNumber, fromDateTime: fromDateTime, untilDateTime: untilDateTime, departureGate: departureGate, arrivalGate: arrivalGate, userId: userId, dateTime: dateTime ); foreach (CrudeFlightSegmentData data in dataList) { var crudeFlightSegmentContract = new CrudeFlightSegmentContract(); DataToContract(data, crudeFlightSegmentContract); list.Add(crudeFlightSegmentContract); } return(list); }
// 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 <CrudeFlightSegmentModel> FetchWithFilter(System.Guid flightSegmentId, System.Guid flightId, System.Guid departureAirportId, System.Guid arrivalAirportId, int logicalSegmentNumber, int physicalSegmentNumber, System.DateTime fromDateTime, System.DateTime untilDateTime, string departureGate, string arrivalGate, System.Guid userId, System.DateTime dateTime) { var list = new List <CrudeFlightSegmentModel>(); List <CrudeFlightSegmentData> dataList = CrudeFlightSegmentData.FetchWithFilter(flightSegmentId, flightId, departureAirportId, arrivalAirportId, logicalSegmentNumber, physicalSegmentNumber, fromDateTime, untilDateTime, departureGate, arrivalGate, userId, dateTime); foreach (CrudeFlightSegmentData data in dataList) { var crudeFlightSegmentBusinessModel = new CrudeFlightSegmentModel(); DataToModel(data, crudeFlightSegmentBusinessModel); list.Add(crudeFlightSegmentBusinessModel); } return(list); }