예제 #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 <CrudeCityModel> FetchWithFilter(System.Guid cityId, System.Guid countryId, string cityCode, string cityName, System.Guid productId, System.Guid userId, System.DateTime dateTime)
        {
            var list = new List <CrudeCityModel>();
            List <CrudeCityData> dataList = CrudeCityData.FetchWithFilter(cityId, countryId, cityCode, cityName, productId, userId, dateTime);

            foreach (CrudeCityData data in dataList)
            {
                var crudeCityBusinessModel = new CrudeCityModel();
                DataToModel(data, crudeCityBusinessModel);
                list.Add(crudeCityBusinessModel);
            }

            return(list);
        }
예제 #2
0
        // 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 <CrudeCityContract> FetchWithFilter(System.Guid cityId, System.Guid countryId, string cityCode, string cityName, System.Guid productId, System.Guid userId, System.DateTime dateTime)
        {
            var list = new List <CrudeCityContract>();
            List <CrudeCityData> dataList = CrudeCityData.FetchWithFilter(
                cityId: cityId,
                countryId: countryId,
                cityCode: cityCode,
                cityName: cityName,
                productId: productId,
                userId: userId,
                dateTime: dateTime
                );

            foreach (CrudeCityData data in dataList)
            {
                var crudeCityContract = new CrudeCityContract();
                DataToContract(data, crudeCityContract);
                list.Add(crudeCityContract);
            }

            return(list);
        }