Esempio n. 1
0
 public IActionResult GetBeverageDetails(long id)
 {
     try
     {
         return(Ok(BeverageMapper.map(itemRepository.GetBeverageById(id))));
     }
     catch (Exception)
     {
         return(BadRequest());
     }
 }
 public BeverageController(IRepository <Beverage> beveragerepo, BeverageMapper beverageMapper)
 {
     _beverageRepo   = beveragerepo;
     _beverageMapper = beverageMapper;
 }