Esempio n. 1
0
        static void Main(string[] args)
        {
            PostCodeInfo postCodeInfo = new PostCodeInfo();

            Console.WriteLine(postCodeInfo.GetCityByPostCode("BR 22291-040"));
            Console.ReadLine();
        }
Esempio n. 2
0
        private static void InsertOnDbIfNotExist(PostCodeInfo extractedInfo)
        {
            //TODO: performance issue!
            var postCodeAlreadyExistInDb = postCodeInfoRepository.GetAll().Any(pc => pc.Link.Equals(extractedInfo.Link));

            if (!postCodeAlreadyExistInDb)
            {
                postCodeInfoRepository.Insert(extractedInfo);
            }
        }