public ActionResult Create(FormCollection collection) { try { // TODO: Add insert logic here OrderModel model = new OrderModel { CustomerId = int.Parse(collection["Customers"]), ProductId = int.Parse(collection["Products"]), Count = int.Parse(collection["Count"]) }; service.AddOrder(model); return(RedirectToAction("Index")); } catch { FillViewBag(); return(View()); } }