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