예제 #1
0
        public static bool FindZipOrPostalCode(string zipToFind, out ZipCodeTable zipToReturn)
        {
            zipToReturn = new ZipCodeTable();
            ZipPostalCodeDbEntities ZipCodes = new ZipPostalCodeDbEntities();

            IEnumerable<ZipCodeTable> matchingZipCode =
                from z in ZipCodes.ZipCodeTables
                where z.ZipCode.Equals(zipToFind)
                select z;

            if (matchingZipCode.Count() > 0)
            {
                zipToReturn = matchingZipCode.First();
                return true;
            }
            else
            {
                return false;
            }
        }
예제 #2
0
 public FileInput()
 {
     ZipCodes = new ZipPostalCodeDbEntities();
     BLHDb = new BLHCustomerDbEntities();
 }