Esempio n. 1
0
        public ActionResult <BuyItem> Get(int id)
        {
            var item = _service.GetById(id);

            if (item == null)
            {
                return(NotFound());
            }
            return(Ok(item));
        }
Esempio n. 2
0
        public ActionResult Edit(int id)
        {
            var data = AutoMapperHelper.MapToSameViewModel <Buy, BuyViewModel>(_buyService.GetById(id));

            return(View(data.ToVM()));
        }
Esempio n. 3
0
 public ActionResult Get(int id)
 {
     return(Ok(
                _buyService.GetById(id)));
 }