public async Task <ActionResult> DeleteConfirmed(int id) { BicepsTriceps bicepsTriceps = await db.BicepsTriceps.FindAsync(id); db.BicepsTriceps.Remove(bicepsTriceps); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public async Task <ActionResult> Edit([Bind(Include = "BicepsTricepsId,Picure,Instructions,Benefits,Sets")] BicepsTriceps bicepsTriceps) { if (ModelState.IsValid) { db.Entry(bicepsTriceps).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(bicepsTriceps)); }
public async Task <ActionResult> Create([Bind(Include = "BicepsTricepsId,Picure,Instructions,Benefits,Sets")] BicepsTriceps bicepsTriceps) { if (ModelState.IsValid) { db.BicepsTriceps.Add(bicepsTriceps); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(bicepsTriceps)); }
// GET: BicepsTriceps/Delete/5 public async Task <ActionResult> Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } BicepsTriceps bicepsTriceps = await db.BicepsTriceps.FindAsync(id); if (bicepsTriceps == null) { return(HttpNotFound()); } return(View(bicepsTriceps)); }