static void Main(string[] args) { PostCodeInfo postCodeInfo = new PostCodeInfo(); Console.WriteLine(postCodeInfo.GetCityByPostCode("BR 22291-040")); Console.ReadLine(); }
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); } }