コード例 #1
0
        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"));
        }
コード例 #2
0
        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));
        }
コード例 #3
0
        // 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));
        }