コード例 #1
0
 public ActionResult Editar(int id = 0)
 {
     try
     {
         return(View(_parceriaApplication.CarregarParceria(id)));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #2
0
        public HttpResponseMessage RetornaParceria(int id)
        {
            try
            {
                var parcerias = _parceriaApplication.CarregarParceria(id);

                if (parcerias == null)
                {
                    return(Request.CreateResponse(HttpStatusCode.NotFound, "Não identificamos a parceria solicitada"));
                }

                return(Request.CreateResponse(HttpStatusCode.Accepted, parcerias));
            }
            catch (Exception ex)
            {
                return(Request.CreateResponse(HttpStatusCode.InternalServerError, ex.Message));
            }
        }
コード例 #3
0
        public ActionResult Index()
        {
            var vieModel = _parceriaApplication.CarregarParceria(2);

            return(View());
        }