Ejemplo n.º 1
0
 public ActionResult <IEnumerable <AnimalLocationHistoryDto> > GetAnimanlLocationHistory(long animalId)
 {
     try
     {
         var history = _service.GetAnimalLocationHistory(animalId);
         return(Ok(history));
     }
     catch (ArgumentException ex)
     {
         return(BadRequest(ex.Message));
     }
     catch (Exception ex)
     {
         return(BadRequest(ex.Message));
     }
 }