Beispiel #1
0
 public ActionResult <List <ItemDTO> > GetAllItems()
 {
     try
     {
         var result = _itemMapper.ListOfCustomersToDTO(_itemService.GetAllItems());
         return(Ok(result));
     }
     catch (ItemException ItemEx)
     { return(BadRequest(ItemEx.Message)); }
     catch (Exception ex)
     { return(BadRequest(ex.Message)); }
 }