protected void Button1_Click(object sender, EventArgs e) { User user = new User(); user.UserName = txtUserId.Text; EmailPassword email = new EmailPassword(); email.CheckUserName(user.UserName); }
public HttpResponseMessage Registration(EmailPassword login) { ModelsDB.Register emailPassword = new ModelsDB.Register(); var logins = DB.Register.Where(p => p.Email == login.Email); if (logins != null) { emailPassword.Email = login.Email; emailPassword.Password = login.Password; DB.Register.Add(emailPassword); DB.SaveChanges(); return(new HttpResponseMessage(HttpStatusCode.OK)); } return(new HttpResponseMessage(HttpStatusCode.BadRequest)); }