public ActionResult <BuyItem> Get(int id) { var item = _service.GetById(id); if (item == null) { return(NotFound()); } return(Ok(item)); }
public ActionResult Edit(int id) { var data = AutoMapperHelper.MapToSameViewModel <Buy, BuyViewModel>(_buyService.GetById(id)); return(View(data.ToVM())); }
public ActionResult Get(int id) { return(Ok( _buyService.GetById(id))); }