public ActionResult ShowPic(int id) { ProductLModel viewModel = new ProductLModel(); ProductViewModel employeeViewModel = new ProductViewModel(this, viewModel); viewModel = employeeViewModel.DBuild(id); byte[] imageData = viewModel.Product.LargePhoto; return(File(imageData, "image/gif")); }
public ActionResult Details(int Productid) { ProductLModel viewModel = new ProductLModel(); ProductViewModel employeeViewModel = new ProductViewModel(this, viewModel); viewModel = employeeViewModel.DBuild(Productid); return(View(viewModel)); }