internal static IRSOrganizationVm FromModel(IRSOrganization organization)
		{
			return new IRSOrganizationVm
			{
				EIN = organization.EIN,
				Name = organization.PrimaryName,
                Address = organization.StreetAddress,
                City = organization.City,
                State = organization.State,
                ZipCode = organization.ZipCode5
			};
		}
        IRSOrganization IRegistrationService.Get(string id)
        {
            bool found = false;
            IRSOrganization org = new IRSOrganization();
            unitOfWork.Context.Entry(org).State = EntityState.Detached;
            org.EIN = id;
            try
            {
                var getHtmlWeb = new HtmlWeb();

                var document = getHtmlWeb.Load("http://apps.irs.gov/app/eos/pub78Search.do?ein1=" + id + "&names=&city=&state=All...&country=US&deductibility=all&dispatchMethod=searchCharities&submitName=Search");
                var orgNode = document.DocumentNode.SelectSingleNode("//body/div/div[3]/div/table[3]/tr[2]/td[2]");
                if (orgNode!=null)
                {
                    org.PrimaryName = orgNode.InnerText;
                }
                var einNode = document.DocumentNode.SelectSingleNode("//body/div/div[3]/div/table[3]/tr[2]/td");
                if (einNode != null)
                {
                    var ein = einNode.InnerText;
                    found = ein.Contains(id.Insert(2, "-"));
                }
                var stateNode = document.DocumentNode.SelectSingleNode("/html/body/div/div[3]/div/table[3]/tr[2]/td[4]");
                if (stateNode != null)
                {
                    org.State = stateNode.InnerText;
                }
                var cityNode = document.DocumentNode.SelectSingleNode("/html/body/div/div[3]/div/table[3]/tr[2]/td[3]");
                if (cityNode != null)
                {
                    org.City = cityNode.InnerText; ;
                }
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception:" + e.ToString());
            }
            if (found)
            {
                return org;
            }
            else
                return null;
        }