示例#1
0
 public server GetServer(string serverName)
 {
     using (PPTPEntities db = new PPTPEntities())
     {
         var server = db.servers.ToList().Find(p => p.Server1 == serverName);
         return(server);
     }
 }
示例#2
0
 public User GetUser(string userId, string password)
 {
     using (PPTPEntities db = new PPTPEntities())
     {
         var user = db.Users.ToList().Find(p => p.User_Id == userId && p.Password == password);
         return(user);
     }
 }
示例#3
0
 public server AddServer(server serv)
 {
     using (PPTPEntities db = new PPTPEntities())
     {
         var server = db.servers.Add(serv);
         db.SaveChanges();
         return(server);
     }
 }