Example #1
0
 public IHttpActionResult Get()
 {
     try
     {
         List <Voluntario> todos = VoluntarioBLL.List();
         return(Content(HttpStatusCode.OK, todos));
         //return Json(todos);
     }
     catch (Exception ex)
     {
         return(Content(HttpStatusCode.BadRequest, ex));
     }
 }
Example #2
0
        //  private Entities db = new Entities();

        // GET: Voluntarios
        public ActionResult Index()
        {
            return(View(VoluntarioBLL.List()));
        }
        //private Entities db = new Entities();

        // GET: Voluntarios
        public ActionResult Index()
        {
            ViewBag.Title = "Listado de Voluntarios registrados";
            return(View(VoluntarioBLL.List()));
        }