Ejemplo 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);
            }
        }
Ejemplo 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);
            }
        }
Ejemplo n.º 3
0
 public void AddServer(server s)
 {
     allserverslist.Add(s);
 }