Esempio n. 1
0
 public ActionResult Get()
 {
     try
     {
         return(Ok(Mapper.Map <IEnumerable <Order>, IEnumerable <OrderViewModel> >(Rep.GetAllOrders())));
     }
     catch (Exception ex)
     {
         Log.LogError($"Failed to retrive order:{ex}");
         return(BadRequest("Failed to retrieve order"));
     }
 }