Exemple #1
0
 // 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"));
 }
Exemple #2
0
        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));
            }
        }