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