// 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 <CrudeCountryModel> FetchWithFilter(System.Guid countryId, string countryCode, string countryName, System.Guid productId, System.Guid userId, System.DateTime dateTime)
        {
            var list = new List <CrudeCountryModel>();
            List <CrudeCountryData> dataList = CrudeCountryData.FetchWithFilter(countryId, countryCode, countryName, productId, userId, dateTime);

            foreach (CrudeCountryData data in dataList)
            {
                var crudeCountryBusinessModel = new CrudeCountryModel();
                DataToModel(data, crudeCountryBusinessModel);
                list.Add(crudeCountryBusinessModel);
            }

            return(list);
        }
Exemple #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 <CrudeCountryContract> FetchWithFilter(System.Guid countryId, string countryCode, string countryName, System.Guid productId, System.Guid userId, System.DateTime dateTime)
        {
            var list = new List <CrudeCountryContract>();
            List <CrudeCountryData> dataList = CrudeCountryData.FetchWithFilter(
                countryId: countryId,
                countryCode: countryCode,
                countryName: countryName,
                productId: productId,
                userId: userId,
                dateTime: dateTime
                );

            foreach (CrudeCountryData data in dataList)
            {
                var crudeCountryContract = new CrudeCountryContract();
                DataToContract(data, crudeCountryContract);
                list.Add(crudeCountryContract);
            }

            return(list);
        }