[HttpGet] public async Task <IHttpActionResult> GetAll()
                                                    {
                                                        try {
                                                            var entities = await _entityRepo.GetAll();

                                                            return(Ok(entities));
                                                        }
                                                        catch (Exception e) { log.Error(new MDCSet(this.ControllerContext.RouteData), e);

                                                                              return(InternalServerError(e)); }
                                                    }
Beispiel #2
0
        // GET: Alumno
        public ActionResult Index()
        {
            var AlumnoRepository = Mapper.Map <IEnumerable <Alumno>, IEnumerable <AlumnoRepository> >(_AlumnoRepository.GetAll());

            return(View(AlumnoRepository));
        }
Beispiel #3
0
 // GET: api/alumno
 public IEnumerable <Alumno> Get()
 {
     return(AlumnoRepository.GetAll());
 }