Exemplo n.º 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;
            }
        }
Exemplo n.º 2
0
 public FileInput()
 {
     ZipCodes = new ZipPostalCodeDbEntities();
     BLHDb = new BLHCustomerDbEntities();
 }