Beispiel #1
0
 public ActionResult <IEnumerable <Autor> > Get()
 {
     //   return context.Autores.ToList();
     //throw new NotImplementedException(); //Para revisar que se ejecute el filtro de excepcion
     claseB.HacerAlgo();
     return(context.Autores.Include(x => x.Libros).ToList());
 }
 public ActionResult <IEnumerable <Autor> > Get()
 {
     throw new NotImplementedException();
     logger.LogInformation("Obteniendo los autores");
     //throw new NotImplementedException();
     claseB.HacerAlgo();
     return(context.Autores.ToList());
 }
        public ActionResult <IEnumerable <Autor> > Get()
        {
            claseB.HacerAlgo();
            logger.LogInformation("Logger info en autores");

            //throw new ApplicationException();

            return(context.Autores.Include(x => x.Libros).ToList());
        }
        public ActionResult <IEnumerable <AutorDTO> > Get()
        {
            //throw new NotImplementedException();
            claseB.HacerAlgo();

            //var autores = context.Autores.Include(x => x.Libros).ToList();
            var autores    = context.Autores.ToList();
            var autoresDTO = mapper.Map <List <AutorDTO> >(autores);

            return(autoresDTO);
        }
Beispiel #5
0
 public void RealizarAccion()
 {
     claseB.HacerAlgo();
 }
Beispiel #6
0
 public ActionResult <IEnumerable <Autor> > Get()
 {
     throw new NotImplementedException();
     claseB.HacerAlgo();
     return(context.Autores.ToList());
 }
Beispiel #7
0
 public ActionResult <IEnumerable <Autor> > Get()             //esta funcion se ejecutara cuando hagamos un get   ActionResult son los codigos de respuesta  IEnumerable es la entidad que nos retorna
 {
     logger.LogInformation("Obteniendo los autores");         //esto sale en consola o base de datos
     claseB.HacerAlgo();
     return(context.Autores.Include(x => x.Libros).ToList()); //Data relacionada incluiremos los libros en la tabla autores
 }