public ActionResult Create(ProductViewModel model) { if (ModelState.IsValid) { CreateProduct command = new CreateProduct(); command.IsInMemory = model.IsInMemory; command.Product = _mapper.Map <Product>(model); _handler.Handler(command); return(RedirectToAction("Index")); } return(View()); }