Esempio n. 1
0
        // copy all rows from a List of serialized data objects to a List of SOAP Contracts,
        //  with a limit on number of returned rows and order by columns, starting at a specific row
        // links:
        //  docLink: http://sql2x.org/documentationLink/3fe9f1b3-97b6-4f58-a0f2-adfcbd973bfc
        public List <CrudeFlightContract> FetchAllWithLimitAndOffset(int limit, int offset)
        {
            var list = new List <CrudeFlightContract>();
            List <CrudeFlightData> dataList = CrudeFlightData.FetchAllWithLimitAndOffset(limit, offset);

            foreach (CrudeFlightData crudeFlight in dataList)
            {
                var contract = new CrudeFlightContract();
                DataToContract(crudeFlight, contract);
                list.Add(contract);
            }

            return(list);
        }
Esempio n. 2
0
        // fetch all rows from table with an offset, and limit of rows
        // links:
        //  docLink: http://sql2x.org/documentationLink/a87e5c54-b47e-4031-bc3b-837b4cf9f692
        public List <CrudeFlightModel> FetchAllWithLimitAndOffset(string limit, string offset)
        {
            var list = new List <CrudeFlightModel>();
            List <CrudeFlightData> dataList = CrudeFlightData.FetchAllWithLimitAndOffset(int.Parse(limit), int.Parse(offset));

            foreach (CrudeFlightData crudeFlightBusiness in dataList)
            {
                var model = new CrudeFlightModel();
                DataToModel(crudeFlightBusiness, model);
                list.Add(model);
            }

            return(list);
        }