Beispiel #1
0
        // GET: Voluntarios/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Voluntario voluntario = VoluntarioBLL.Get(id);

            if (voluntario == null)
            {
                return(HttpNotFound());
            }
            return(View(voluntario));
        }
Beispiel #2
0
 public IHttpActionResult Get(int id)
 {
     try
     {
         Voluntario result = VoluntarioBLL.Get(id);
         if (result == null)
         {
             return(NotFound());
         }
         return(Content(HttpStatusCode.OK, result));
     }
     catch (Exception ex)
     {
         return(Content(HttpStatusCode.BadRequest, ex));
     }
 }