public IHttpActionResult Get(int id) { var shift = _shiftService.GetById(id); if (shift == null) { return(NotFound()); } return(Ok(shift)); }
public ActionResult Edit(string id) { try { Shift obj = iShift.GetById(id); return(PartialView(obj)); } catch (Exception ex) { return(Json(new { ErrorCode = 1, Message = ex.Message }, JsonRequestBehavior.AllowGet)); } }