public async Task <ActionResult> DeleteConfirmed(int id) { Connection_Request connection_Request = await db.Connection_Requeset.FindAsync(id); db.Connection_Requeset.Remove(connection_Request); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public async Task <ActionResult> Create([Bind(Include = "Id,IsApproved")] Connection_Request connection_Request) { if (ModelState.IsValid) { db.Connection_Requeset.Add(connection_Request); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(connection_Request)); }
// GET: Network/Details/5 public async Task <ActionResult> Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Connection_Request connection_Request = await db.Connection_Requeset.FindAsync(id); if (connection_Request == null) { return(HttpNotFound()); } return(View(connection_Request)); }