public async Task <ActionResult> DeleteConfirmed(int id) { HomeDelivery_Tbl homedelivery_tbl = await db.HomeDelivery_Tbl.FindAsync(id); db.HomeDelivery_Tbl.Remove(homedelivery_tbl); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public async Task <ActionResult> Edit([Bind(Include = "homdelid,homdellocation,homdelcity,createdby,createddate,updatedby,updateddate")] HomeDelivery_Tbl homedelivery_tbl) { if (ModelState.IsValid) { db.Entry(homedelivery_tbl).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(homedelivery_tbl)); }
// GET: /HomeDelivery/Delete/5 public async Task <ActionResult> Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } HomeDelivery_Tbl homedelivery_tbl = await db.HomeDelivery_Tbl.FindAsync(id); if (homedelivery_tbl == null) { return(HttpNotFound()); } return(View(homedelivery_tbl)); }