Ejemplo n.º 1
0
        public Host CheckId(int id)//מקבל ת"ז ומחזיר את המארח שלו
        {
            IEnumerable <Host> hostList = dal.Get_HostList();
            var H = hostList.FirstOrDefault(X => X.HostKey == id);

            if (H != null)
            {
                return(H);
            }
            throw new KeyNotFoundException("הת.ז לא קיימת במערכת ");
        }
Ejemplo n.º 2
0
        //HostingUnit
        public Host CheckId(int id)
        {
            DAL.IDAL           dal      = DAL.FactoryDal.GetDal();
            IEnumerable <Host> hostList = dal.Get_HostList();
            var H = hostList.FirstOrDefault(X => X.HostKey == id);

            if (H != null)
            {
                return(H);
            }
            throw new KeyNotFoundException("הת.ז לא קיימת במערכת ");
        }