Exemplo n.º 1
0
 public ActionResult <Artist> Get()
 {
     try
     {
         return(Ok(_service.GetAll()));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
Exemplo n.º 2
0
 public ActionResult <IEnumerable <Artist> > GetAll()
 {
     try
     {
         IEnumerable <Artist> artists = _service.GetAll();
         return(Ok(artists));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }