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