// 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 <CrudeBookingFlightSegmentModel> FetchWithFilter(System.Guid bookingFlightSegmentId, System.Guid becameBookingFlightSegmentId, System.Guid bindingBookingFlightSegmentId, System.Guid bookingId, System.Guid flightSegmentId, string defaultStateRcd, System.Guid userId, System.DateTime dateTime) { var list = new List <CrudeBookingFlightSegmentModel>(); List <CrudeBookingFlightSegmentData> dataList = CrudeBookingFlightSegmentData.FetchWithFilter(bookingFlightSegmentId, becameBookingFlightSegmentId, bindingBookingFlightSegmentId, bookingId, flightSegmentId, defaultStateRcd, userId, dateTime); foreach (CrudeBookingFlightSegmentData data in dataList) { var crudeBookingFlightSegmentBusinessModel = new CrudeBookingFlightSegmentModel(); DataToModel(data, crudeBookingFlightSegmentBusinessModel); list.Add(crudeBookingFlightSegmentBusinessModel); } return(list); }
// 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 <CrudeBookingFlightSegmentContract> FetchWithFilter(System.Guid bookingFlightSegmentId, System.Guid becameBookingFlightSegmentId, System.Guid bindingBookingFlightSegmentId, System.Guid bookingId, System.Guid flightSegmentId, string defaultStateRcd, System.Guid userId, System.DateTime dateTime) { var list = new List <CrudeBookingFlightSegmentContract>(); List <CrudeBookingFlightSegmentData> dataList = CrudeBookingFlightSegmentData.FetchWithFilter( bookingFlightSegmentId: bookingFlightSegmentId, becameBookingFlightSegmentId: becameBookingFlightSegmentId, bindingBookingFlightSegmentId: bindingBookingFlightSegmentId, bookingId: bookingId, flightSegmentId: flightSegmentId, defaultStateRcd: defaultStateRcd, userId: userId, dateTime: dateTime ); foreach (CrudeBookingFlightSegmentData data in dataList) { var crudeBookingFlightSegmentContract = new CrudeBookingFlightSegmentContract(); DataToContract(data, crudeBookingFlightSegmentContract); list.Add(crudeBookingFlightSegmentContract); } return(list); }