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));
        }
Exemple #2
0
 public ActionResult ListProducts()
 => Json(new { products = _productApp.GetAll() }, JsonRequestBehavior.AllowGet);
 // GET: Products
 public ActionResult Index()
 {
     return(View(_productApp.GetAll()));
 }
Exemple #4
0
 public async Task <ActionResult <IEnumerable <ProductViewModel> > > GetProducts()
 {
     return(CustomResponse(_mapper.Map <IEnumerable <ProductViewModel> >(await _productApp.GetAll())));
 }
Exemple #5
0
 public IActionResult GetAll()
 {
     return(Json(_service.GetAll()));
 }
Exemple #6
0
 public async Task <IEnumerable <Product> > GetAll(int corpClientId)
 {
     return(await productApp.GetAll(corpClientId));
 }