public async Task <ActionResult <IEnumerable <ProductViewModel> > > GetProducts() { var products = await _productApp.GetAll(); var productViewModels = _mapper.Map <IEnumerable <ProductViewModel> >(products); //criação do produto. return(CustomResponse(products)); }
public ActionResult ListProducts() => Json(new { products = _productApp.GetAll() }, JsonRequestBehavior.AllowGet);
// GET: Products public ActionResult Index() { return(View(_productApp.GetAll())); }
public async Task <ActionResult <IEnumerable <ProductViewModel> > > GetProducts() { return(CustomResponse(_mapper.Map <IEnumerable <ProductViewModel> >(await _productApp.GetAll()))); }
public IActionResult GetAll() { return(Json(_service.GetAll())); }
public async Task <IEnumerable <Product> > GetAll(int corpClientId) { return(await productApp.GetAll(corpClientId)); }