Exemplo n.º 1
0
        // 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 <CrudeAirportModel> FetchWithFilter(
            System.Guid airportId,
            string airportName,
            string airportTypeRcd,
            System.Guid cityId,
            System.Guid productId,
            decimal utcOffset,
            decimal elevationInMeters,
            decimal runwayInMeters,
            string latitude,
            string longitude,
            System.Guid timezoneId,
            string variation,
            string attendance,
            bool controlTowerFlag,
            System.DateTime activationDateTime,
            System.Guid userId,
            System.DateTime dateTime)
        {
            var list = new List <CrudeAirportModel>();
            List <CrudeAirportData> dataList = CrudeAirportData.FetchWithFilter(airportId, airportName, airportTypeRcd, cityId, productId, utcOffset, elevationInMeters, runwayInMeters, latitude, longitude, timezoneId, variation, attendance, controlTowerFlag, activationDateTime, userId, dateTime);

            foreach (CrudeAirportData data in dataList)
            {
                var crudeAirportBusinessModel = new CrudeAirportModel();
                DataToModel(data, crudeAirportBusinessModel);
                list.Add(crudeAirportBusinessModel);
            }

            return(list);
        }