Métodos Frequentes
Métodos Frequentes
Métodos Frequentes
Métodos Frequentes
public ActionResult Index() { try { var wishListDtos = _wishListService.ListWishList(User.Identity.GetUserId()); var viewModel = Mapper.Map <List <WishListViewModel> >(wishListDtos); foreach (var item in viewModel) { var itemProduct = _productService.SearchProduct(item.ProductId).FirstOrDefault(); item.Product = Mapper.Map <ProductViewModel>(itemProduct); } return(View("Index", viewModel)); } catch (Exception e) { return(View("Index")); } }