Esempio n. 1
0
        public void deleteserver(string id)
        {
            server p = allserverslist.Where(x => x.ServerId == id).FirstOrDefault();

            if (p == null)
            {
                throw new Exception("id not found ");
            }
            else
            {
                allserverslist.Remove(p);
            }
        }
Esempio n. 2
0
        public server getbyid(String id)
        {
            server p = allserverslist.Where(x => x.ServerId == id).FirstOrDefault();

            if (p == null)
            {
                throw new Exception("id not found ");
            }
            else
            {
                return(p);
            }
        }
Esempio n. 3
0
 public void AddServer(server s)
 {
     allserverslist.Add(s);
 }