public async Task <ActionResult> Edit([Bind(Include = "id,Name_ru,price,color,availability,forWhom,category,producer,season,matherial,description_ru")] Shoes shoes) { if (ModelState.IsValid) { db.Entry(shoes).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(shoes)); }
public async Task <ActionResult> DeleteConfirmed(int id) { var prod = db.Products.Find(id); db.Products.Remove(prod); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }