public IHttpActionResult Buscar(string idDisciplina) { try { return(Ok(serviceDisciplina.Obter(Int32.Parse(idDisciplina)))); } catch (ObjectNotFoundException e) { return(ResponseMessage(Request.CreateResponse(HttpStatusCode.NotFound, e.Message))); } catch (InvalidCastException e) { return(BadRequest(e.Message)); } catch (Exception e) { return(BadRequest(e.Message)); } }
public ActionResult Atualizar(int id) { var disciplina = _serviceDisciplina.Obter(Request.Cookies[FormsAuthentication.FormsCookieName].Value, id); return(View(disciplina)); }