public ActionResult Create(ProductDTO obj) { try { MyRepository repository = new MyRepository(); repository.AddProduct(obj); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Create(ProductDTO obj) { try { MyRepository repository = new MyRepository(); repository.AddProduct(obj); return(RedirectToAction("Index")); } catch { return(View()); } }