コード例 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Models.CareProvider careProvider = db.CareProviders.Find(id);
            db.CareProviders.Remove(careProvider);
            db.SaveChanges();

            return(RedirectToAction("Index"));
        }
コード例 #2
0
        //===============================================================================
        // GET: CareProviders/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            Models.CareProvider careProvider = db.CareProviders.Find(id);

            if (careProvider == null)
            {
                return(HttpNotFound());
            }

            return(View(careProvider));
        }