public ActionResult Create(Clothes clothes) { if (ModelState.IsValid) { db.ClothesItems.Add(clothes); db.SaveChanges(); return RedirectToAction("Index"); } return View(clothes); }
public ActionResult Edit(Clothes clothes) { if (ModelState.IsValid) { db.Entry(clothes).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(clothes); }