Пример #1
0
        // fetch all rows from table with a limit of rows
        // links:
        //  docLink: http://sql2x.org/documentationLink/6028cc89-271d-4e09-b157-d1016dcaf85e
        public List <CrudeDefaultResourceMeasurementModel> FetchAllWithLimit(string limit)
        {
            var list = new List <CrudeDefaultResourceMeasurementModel>();
            List <CrudeDefaultResourceMeasurementData> dataList = CrudeDefaultResourceMeasurementData.FetchAllWithLimit(int.Parse(limit));

            foreach (CrudeDefaultResourceMeasurementData crudeDefaultResourceMeasurementBusiness in dataList)
            {
                var model = new CrudeDefaultResourceMeasurementModel();
                DataToModel(crudeDefaultResourceMeasurementBusiness, model);
                list.Add(model);
            }

            return(list);
        }
        // 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
        // links:
        //  docLink: http://sql2x.org/documentationLink/f23c4cd8-e941-4b3e-8fda-7b2ac6a399f7
        public List <CrudeDefaultResourceMeasurementContract> FetchAllWithLimit(int limit)
        {
            var list = new List <CrudeDefaultResourceMeasurementContract>();
            List <CrudeDefaultResourceMeasurementData> dataList = CrudeDefaultResourceMeasurementData.FetchAllWithLimit(limit);

            foreach (CrudeDefaultResourceMeasurementData crudeDefaultResourceMeasurement in dataList)
            {
                var contract = new CrudeDefaultResourceMeasurementContract();
                DataToContract(crudeDefaultResourceMeasurement, contract);
                list.Add(contract);
            }

            return(list);
        }