public ActionResult Register(UserAccount acc) { if(ModelState.IsValid) { using (UserDBContext db = new UserDBContext()) { db.userAccount.Add(acc); db.SaveChanges(); } ModelState.Clear(); ViewBag.Message = acc.FirstName + " " + acc.LastName + " Successfully Registered!"; } return View(); }