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