AdventureWorks.Controllers.DepartmentsController.Delete C# (CSharp) Method

Delete() public method

public Delete ( short id ) : System.Web.Mvc.ActionResult
id short
return System.Web.Mvc.ActionResult
        public ActionResult Delete(short? id)
        {
            if (id == null)
            {
                return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
            }
            Department department = db.Departments.Find(id);
            if (department == null)
            {
                return HttpNotFound();
            }
            return View(department);
        }