// GET: Biz/Developer/Edit/5 public ActionResult Edit(long?id) { if (id.HasValue) { var model = _service.GetById(id.Value); return(View(model)); } FlashWarn("没有指定ID"); return(RedirectToAction("Index")); }
public IHttpActionResult GetDeveloper(int id) { try { Developer Developer = DeveloperService.GetById(id); if (Developer == null) { return(NotFound()); } return(Ok(Developer)); } catch (RepositoryException ex) { return(InternalServerError(ex)); } }