Last active
          August 29, 2015 14:19 
        
      - 
      
- 
        Save johnmmoss/8c487b79974ee3dfbd3e to your computer and use it in GitHub Desktop. 
    ASP.NET Standard Edit Controller
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // GET: /Department/Edit/5 | |
| public ActionResult Edit(int? id) | |
| { | |
| if (id == null) | |
| { | |
| return new HttpStatusCodeResult(HttpStatusCode.BadRequest); | |
| } | |
| Department department = _context.Departments.Find(id); | |
| if (department == null) | |
| { | |
| return HttpNotFound(); | |
| } | |
| return View(department); | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment