Exemplo n.º 1
0
 public static void CreateUser(PERSON pERSON)
 {
     using (var context = new TwitterCloneDataContext())
     {
         context.PERSON.Add(pERSON);
         context.SaveChanges();
     }
 }
Exemplo n.º 2
0
 public bool ValidateUser(PERSON LoginInfo)
 {
     using (var context = new TwitterCloneDataContext())
     {
         var query = from st in context.PERSON
                     where st.User_ID == LoginInfo.User_ID && st.Password == LoginInfo.Password
                     select st;
         if (query.Count() > 0)
         {
             return(true);
         }
     }
     return(false);
 }