public ActionResult Create(SalesmanModel salesmanmodel) { if (ModelState.IsValid) { context.SalesmanModels.Add(salesmanmodel); context.SaveChanges(); return RedirectToAction("Index"); } return View(salesmanmodel); }
public ActionResult Edit(SalesmanModel salesmanmodel) { if (ModelState.IsValid) { context.Entry(salesmanmodel).State = EntityState.Modified; context.SaveChanges(); return RedirectToAction("Index"); } return View(salesmanmodel); }
private bool getID(SalesmanModel model) { return (1 == 1); }