public ActionResult Register(Account model) { ViewData["MSGREG"] = "Username Already Taken"; AccountRepository _accountRepository = new AccountRepository(model); if (_accountRepository.checkUsername() == false) { _accountRepository.insertData(); return RedirectToAction("Login"); } else { return View(); } }
public ActionResult InsertData(Account model) { AccountRepository _accountRepository = new AccountRepository(model); _accountRepository.insertData(); return RedirectToAction("AccountList"); }