public ActionResult Create(Employer employer) { if (ModelState.IsValid) { db.Employers.Add(employer); db.SaveChanges(); return RedirectToAction("Index"); } return View(employer); }
/* public ActionResult SignIn() { return View(); } * * [HttpPost] public ActionResult SignIn(string input) { var password = from e in db.Employers select e.ePassword; if (password.Equals(input)) { var edi = from e in db.Employers where e.ePassword == input select e.ID; Session["myApp-Authentication"] = "123"; return RedirectToAction("Details", new { id = edi }); } return View(); }*/ public ActionResult Login(Employer employer) { return View(employer); }
public ActionResult Edit(Employer employer) { if (ModelState.IsValid) { db.Entry(employer).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(employer); }