예제 #1
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 <CrudeAddressContract> FetchWithFilter(System.Guid addressId, string addressTypeRcd, string addressOne, string addressTwo, string addressThree, string city, string street, string state, string district, string province, string zipCode, string poBox, string comment, System.Guid userId, System.DateTime dateTime)
        {
            var list = new List <CrudeAddressContract>();
            List <CrudeAddressData> dataList = CrudeAddressData.FetchWithFilter(
                addressId: addressId,
                addressTypeRcd: addressTypeRcd,
                addressOne: addressOne,
                addressTwo: addressTwo,
                addressThree: addressThree,
                city: city,
                street: street,
                state: state,
                district: district,
                province: province,
                zipCode: zipCode,
                poBox: poBox,
                comment: comment,
                userId: userId,
                dateTime: dateTime
                );

            foreach (CrudeAddressData data in dataList)
            {
                var crudeAddressContract = new CrudeAddressContract();
                DataToContract(data, crudeAddressContract);
                list.Add(crudeAddressContract);
            }

            return(list);
        }
예제 #2
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 <CrudeAddressModel> FetchWithFilter(System.Guid addressId, string addressTypeRcd, string addressOne, string addressTwo, string addressThree, string city, string street, string state, string district, string province, string zipCode, string poBox, string comment, System.Guid userId, System.DateTime dateTime)
        {
            var list = new List <CrudeAddressModel>();
            List <CrudeAddressData> dataList = CrudeAddressData.FetchWithFilter(addressId, addressTypeRcd, addressOne, addressTwo, addressThree, city, street, state, district, province, zipCode, poBox, comment, userId, dateTime);

            foreach (CrudeAddressData data in dataList)
            {
                var crudeAddressBusinessModel = new CrudeAddressModel();
                DataToModel(data, crudeAddressBusinessModel);
                list.Add(crudeAddressBusinessModel);
            }

            return(list);
        }