public static void CreateUser(PERSON pERSON) { using (var context = new TwitterCloneDataContext()) { context.PERSON.Add(pERSON); context.SaveChanges(); } }
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); }