// GET: Product/Details/5
        public ActionResult Details(int id)
        {
            var product = _productApp.GetById(id);

            if (product == null)
            {
                return(HttpNotFound());
            }
            return(View(product));
        }
Beispiel #2
0
 public async Task <ActionResult <ProductViewModel> > GetProductById(Guid id)
 {
     return(CustomResponse(_mapper.Map <ProductViewModel>(await _productApp.GetById(id))));
 }
        public ActionResult <ProductViewModel> GetProductById(Guid Id)
        {
            var product = _mapper.Map <ProductViewModel>(_productApp.GetById(Id));

            return(CustomResponse(product));
        }