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