// GET: Product public ActionResult Index(int id) { ViewBag.ProductId = id; var obj = AsyncHelper.RunSync(async() => await _webSiteAppServer.GetProductByIdAsync(id)).MapTo <ProductModel>(); return(View(obj)); }
// GET: Gallery public async Task <ActionResult> Index(int id) { var model = (await _webSiteAppServer.GetProductByIdAsync(id)).MapTo <ProductModel>(); ViewBag.FileList = await _relationAppService.GetFileRDtoList(new Sys.Dto.FileRInput() { KeyId = id, ModuleType = ModuleType.ProductDetail }); return(View(model)); }
/// <summary> /// 编辑 /// </summary> /// <returns></returns> public ActionResult Edit(int productId) { var obj = AsyncHelper.RunSync(async() => await _webSiteAppServer.GetProductByIdAsync(productId)).MapTo <ProductModel>(); return(View(obj)); }